Messages in this thread | | | Date | Wed, 29 Apr 2009 09:23:02 -0400 | From | Andrew Gallatin <> | Subject | Re: [PATCH] sched: account system time properly |
| |
Eric Dumazet wrote:
> On mostly idle cpu, irqs were thus not accounted and top or mpstat could tell > user/admin that cpu was 100 % idle, 0.00 % irq, 0.00 % softirq, while it was not. > > Reported-by: Andrew Gallatin <gallatin@myri.com> > Re-reported-by: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> > Tested-by: Eric Dumazet <dada1@cosmosbay.com> > Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> > > diff --git a/kernel/sched.c b/kernel/sched.c > index b902e58..26efa47 100644 > --- a/kernel/sched.c > +++ b/kernel/sched.c > @@ -4732,7 +4732,7 @@ void account_process_tick(struct task_struct *p, int user_tick) > > if (user_tick) > account_user_time(p, one_jiffy, one_jiffy_scaled); > - else if (p != rq->idle) > + else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) > account_system_time(p, HARDIRQ_OFFSET, one_jiffy, > one_jiffy_scaled); > else >
I can confirm this fixes the issue for me. Thank you, and I am sorry if my git-bisect fumble-fingers caused too much wasted time.
Cheers,
Drew
| |