Re: [RFC,PATCH 2/2] cputimers/proc:do_task_stat()->thread_group_times() is racy and O(n) under ->siglock

From: Peter Zijlstra
Date: Thu Mar 25 2010 - 08:19:27 EST


On Thu, 2010-03-25 at 13:12 +0100, Oleg Nesterov wrote:
> > Right, so from what I remember the issue is that, yes top et al rely on
> > that monotonicity,
>
> Really? So, do you think the change above will break user-space?
>
> How sad :/

IIRC top can give very funny results if you break it hard enough, it
likes to give 9999% cputime if the thing goes backwards over the sample
interval.

But I'm not sure your race is large enough to ever show up like that, so
it might all just work out, but in general it does tend to require
monotonic times.

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