Re: [RFC PATCH] sched, timer: Use atomics for thread_group_cputimer stats

Peter Zijlstra
2015-01-26T17:12:12Z

On Fri, Jan 23, 2015 at 03:45:55PM -0800, Jason Low wrote:
> On a side note, if we just move the cputimer->running = 1 to after the
> call to update_gt_cputime in thread_group_cputimer(), then we don't have
> to worry about concurrent adds occuring in this function?

Yeah, maybe.. There are a few races there, but I figure that because we
already test cputimer->running outside of cputimer->lock they're already
possible.