lkml.org 
[lkml]   [2005]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] CKRM [2/8] More accurate account for CPU & IO scheduling
From
Date
Gerrit Huizenga <gh@us.ibm.com> writes:

> --- linux-2.6.11-rc5.orig/kernel/sched.c 2005-02-23 20:03:10.000000000 -0800
> +++ linux-2.6.11-rc5/kernel/sched.c 2005-02-24 00:54:56.572070756 -0800
> @@ -288,6 +288,8 @@
> @@ -2806,6 +2809,8 @@
>
> sched_info_switch(prev, next);
> if (likely(prev != next)) {
> + add_delay_ts(next, waitcpu_total, next->timestamp, now);
> + inc_delay(next, runs);

This is an extremly hot path. I think it needs far more justification
why you really need this. In general we try to keep the context
switch as fast as possible; I don't think it's a good idea to add
accounting like this.

How about you investigate ways to do this using samples
from the regular statistics timers? If it's good enough for all
other CPU accounting, it should be good enough for this relatively
obscure metric too.

-Andi
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.359 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site