Messages in this thread | | | Subject | Re: [PATCH] CKRM [2/8] More accurate account for CPU & IO scheduling | From | Andi Kleen <> | Date | Thu, 24 Feb 2005 21:10:49 +0100 |
| |
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/
| |