public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly
@ 2009-04-07  6:33 figo.zhang
  2009-04-07 16:57 ` Américo Wang
  0 siblings, 1 reply; 4+ messages in thread
From: figo.zhang @ 2009-04-07  6:33 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, rdunlap

the comment of the calc_delta_fair() maybe not correctly, should be
delta *= NICE_O_LOAD/se->load

Signed-off-by: figo.zhang <figo.zhang@kolorific.com>

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 3816f21..5134b45 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
*table, int write, #endif
 
 /*
- * delta /= w
+ * delta *= NICE_O_LOAD/se->load
  */
 static inline unsigned long
 calc_delta_fair(unsigned long delta, struct sched_entity *se)

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

* Re: [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly
  2009-04-07  6:33 [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly figo.zhang
@ 2009-04-07 16:57 ` Américo Wang
  2009-04-08  2:27   ` figo.zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Américo Wang @ 2009-04-07 16:57 UTC (permalink / raw)
  To: figo.zhang; +Cc: mingo, linux-kernel, rdunlap

On Tue, Apr 07, 2009 at 02:33:06PM +0800, figo.zhang wrote:
>the comment of the calc_delta_fair() maybe not correctly, should be
>delta *= NICE_O_LOAD/se->load
>
>Signed-off-by: figo.zhang <figo.zhang@kolorific.com>

Agreed.

But...


>
>diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
>index 3816f21..5134b45 100644
>--- a/kernel/sched_fair.c
>+++ b/kernel/sched_fair.c
>@@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
>*table, int write, #endif
> 
> /*
>- * delta /= w
>+ * delta *= NICE_O_LOAD/se->load

Is that an 'O' or '0'(zero)? It looks like an 'O' for me ...
Obviously, it should be '0' (zero). :)


>  */
> static inline unsigned long
> calc_delta_fair(unsigned long delta, struct sched_entity *se)
>--
>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/

-- 
Do what you love, f**k the rest! F**k the regulations!
 

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

* Re: [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly
  2009-04-07 16:57 ` Américo Wang
@ 2009-04-08  2:27   ` figo.zhang
  2009-04-08  9:53     ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: figo.zhang @ 2009-04-08  2:27 UTC (permalink / raw)
  To: Américo Wang; +Cc: mingo, linux-kernel, rdunlap

the comment of the calc_delta_fair() maybe not correctly, should be
delta *= NICE_0_LOAD/se->load

Signed-off-by: figo.zhang <figo.zhang@kolorific.com>

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 3816f21..5134b45 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
*table, int write, #endif
 
 /*
- * delta /= w
+ * delta *= NICE_0_LOAD/se->load
  */
 static inline unsigned long
 calc_delta_fair(unsigned long delta, struct sched_entity *se)




Wed, 8 Apr 2009 00:57:36 +0800
Américo Wang <xiyou.wangcong@gmail.com> :

> On Tue, Apr 07, 2009 at 02:33:06PM +0800, figo.zhang wrote:
> >the comment of the calc_delta_fair() maybe not correctly, should be
> >delta *= NICE_O_LOAD/se->load
> >
> >Signed-off-by: figo.zhang <figo.zhang@kolorific.com>
> 
> Agreed.
> 
> But...
> 
> 
> >
> >diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> >index 3816f21..5134b45 100644
> >--- a/kernel/sched_fair.c
> >+++ b/kernel/sched_fair.c
> >@@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
> >*table, int write, #endif
> > 
> > /*
> >- * delta /= w
> >+ * delta *= NICE_O_LOAD/se->load
> 
> Is that an 'O' or '0'(zero)? It looks like an 'O' for me ...
> Obviously, it should be '0' (zero). :)
> 
> 
> >  */
> > static inline unsigned long
> > calc_delta_fair(unsigned long delta, struct sched_entity *se)
> >--
> >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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly
  2009-04-08  2:27   ` figo.zhang
@ 2009-04-08  9:53     ` Peter Zijlstra
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2009-04-08  9:53 UTC (permalink / raw)
  To: figo.zhang; +Cc: Américo Wang, mingo, linux-kernel, rdunlap

On Wed, 2009-04-08 at 10:27 +0800, figo.zhang wrote:
> the comment of the calc_delta_fair() maybe not correctly, should be
> delta *= NICE_0_LOAD/se->load
> 
> Signed-off-by: figo.zhang <figo.zhang@kolorific.com>
> 
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 3816f21..5134b45 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
> *table, int write, #endif
>  
>  /*
> - * delta /= w
> + * delta *= NICE_0_LOAD/se->load
>   */
>  static inline unsigned long
>  calc_delta_fair(unsigned long delta, struct sched_entity *se)

The comment is conceptually correct.

NICE_0_LOAD := 1 and se->load := w, ergo, delta /= w.



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

end of thread, other threads:[~2009-04-08  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07  6:33 [PATCH]kernel/sched_fair.c: the comment of the calc_delta_fair() maybe not correctly figo.zhang
2009-04-07 16:57 ` Américo Wang
2009-04-08  2:27   ` figo.zhang
2009-04-08  9:53     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox