linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
@ 2015-07-05  9:43 byungchul.park
  2015-07-06 11:27 ` Peter Zijlstra
  2016-08-25  6:56 ` Byungchul Park
  0 siblings, 2 replies; 5+ messages in thread
From: byungchul.park @ 2015-07-05  9:43 UTC (permalink / raw)
  To: mingo, peterz; +Cc: minchan.kim, linux-kernel, Byungchul Park

From: Byungchul Park <byungchul.park@lge.com>

account_numa_dequeue and manipulating se->group_node are meaningful only on SMP

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 kernel/sched/fair.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 09456fc..93b8de6 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2337,15 +2337,17 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
 	update_load_sub(&cfs_rq->load, se->load.weight);
 	if (!parent_entity(se))
 		update_load_sub(&rq_of(cfs_rq)->load, se->load.weight);
+#ifdef CONFIG_SMP
 	if (entity_is_task(se)) {
 		account_numa_dequeue(rq_of(cfs_rq), task_of(se));
 		list_del_init(&se->group_node);
 	}
+#endif
 	cfs_rq->nr_running--;
 }
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
-# ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
 static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
 {
 	long tg_weight;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
  2015-07-05  9:43 [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system byungchul.park
@ 2015-07-06 11:27 ` Peter Zijlstra
  2015-07-06 12:05   ` Byungchul Park
  2016-08-25  6:56 ` Byungchul Park
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2015-07-06 11:27 UTC (permalink / raw)
  To: byungchul.park; +Cc: mingo, minchan.kim, linux-kernel

On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.park@lge.com wrote:
> From: Byungchul Park <byungchul.park@lge.com>
> 
> account_numa_dequeue and manipulating se->group_node are meaningful only on SMP

Clearly the data element exists for !SMP and you didn't fix that.
Also, try and do this without adding more #ifdef.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
  2015-07-06 11:27 ` Peter Zijlstra
@ 2015-07-06 12:05   ` Byungchul Park
  0 siblings, 0 replies; 5+ messages in thread
From: Byungchul Park @ 2015-07-06 12:05 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: mingo, linux-kernel

On Mon, Jul 06, 2015 at 01:27:46PM +0200, Peter Zijlstra wrote:
> On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.park@lge.com wrote:
> > From: Byungchul Park <byungchul.park@lge.com>
> > 
> > account_numa_dequeue and manipulating se->group_node are meaningful only on SMP
> 
> Clearly the data element exists for !SMP and you didn't fix that.
> Also, try and do this without adding more #ifdef.

yes.

it will be better if it can be done without #ifdef.
i will try it.

thank you very much :)
byungchul

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
  2015-07-05  9:43 [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system byungchul.park
  2015-07-06 11:27 ` Peter Zijlstra
@ 2016-08-25  6:56 ` Byungchul Park
  2016-08-26  3:00   ` Byungchul Park
  1 sibling, 1 reply; 5+ messages in thread
From: Byungchul Park @ 2016-08-25  6:56 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel

On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.park@lge.com wrote:
> From: Byungchul Park <byungchul.park@lge.com>

Hello,

This patch was rejected and the next version having tried to apply what
peterz recommanded, was almost ignored last year. But now, exactly same
thing is already in the tree which was posted by Tim Chen. Yes. This is
a trivial one, I thus don't mind much. Commiting patches is not important.

However, I want to ask you to treat patches by new one like me with more
consideration, please. Sometimes I feel thankful while sometimes I feel
disappointed with a happening like this. It would be appriciated if you
do so.

Thank you,
Byungchul

> 
> account_numa_dequeue and manipulating se->group_node are meaningful only on SMP
> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>  kernel/sched/fair.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 09456fc..93b8de6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2337,15 +2337,17 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  	update_load_sub(&cfs_rq->load, se->load.weight);
>  	if (!parent_entity(se))
>  		update_load_sub(&rq_of(cfs_rq)->load, se->load.weight);
> +#ifdef CONFIG_SMP
>  	if (entity_is_task(se)) {
>  		account_numa_dequeue(rq_of(cfs_rq), task_of(se));
>  		list_del_init(&se->group_node);
>  	}
> +#endif
>  	cfs_rq->nr_running--;
>  }
>  
>  #ifdef CONFIG_FAIR_GROUP_SCHED
> -# ifdef CONFIG_SMP
> +#ifdef CONFIG_SMP
>  static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
>  {
>  	long tg_weight;
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system
  2016-08-25  6:56 ` Byungchul Park
@ 2016-08-26  3:00   ` Byungchul Park
  0 siblings, 0 replies; 5+ messages in thread
From: Byungchul Park @ 2016-08-26  3:00 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel

On Thu, Aug 25, 2016 at 03:56:59PM +0900, Byungchul Park wrote:
> On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.park@lge.com wrote:
> > From: Byungchul Park <byungchul.park@lge.com>
> 
> Hello,
> 
> This patch was rejected and the next version having tried to apply what
> peterz recommanded, was almost ignored last year. But now, exactly same
> thing is already in the tree which was posted by Tim Chen. Yes. This is
> a trivial one, I thus don't mind much. Commiting patches is not important.

I meant that "Whether my patches are commited or not is not important".

> However, I want to ask you to treat patches by new one like me with more
> consideration, please. Sometimes I feel thankful while sometimes I feel
> disappointed with a happening like this. It would be appriciated if you
> do so.
> 
> Thank you,
> Byungchul
> 
> > 
> > account_numa_dequeue and manipulating se->group_node are meaningful only on SMP
> > 
> > Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> > ---
> >  kernel/sched/fair.c |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 09456fc..93b8de6 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -2337,15 +2337,17 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
> >  	update_load_sub(&cfs_rq->load, se->load.weight);
> >  	if (!parent_entity(se))
> >  		update_load_sub(&rq_of(cfs_rq)->load, se->load.weight);
> > +#ifdef CONFIG_SMP
> >  	if (entity_is_task(se)) {
> >  		account_numa_dequeue(rq_of(cfs_rq), task_of(se));
> >  		list_del_init(&se->group_node);
> >  	}
> > +#endif
> >  	cfs_rq->nr_running--;
> >  }
> >  
> >  #ifdef CONFIG_FAIR_GROUP_SCHED
> > -# ifdef CONFIG_SMP
> > +#ifdef CONFIG_SMP
> >  static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
> >  {
> >  	long tg_weight;
> > -- 
> > 1.7.9.5
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-26  3:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-05  9:43 [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system byungchul.park
2015-07-06 11:27 ` Peter Zijlstra
2015-07-06 12:05   ` Byungchul Park
2016-08-25  6:56 ` Byungchul Park
2016-08-26  3:00   ` Byungchul Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).