Re: [PATCH RFC] tick/nohz: fix data races in get_cpu_idle_time_us()

From: Peter Zijlstra
Date: Tue Jan 31 2023 - 14:58:18 EST


On Tue, Jan 31, 2023 at 03:44:00PM +0100, Thomas Gleixner wrote:

> P.S.: I hate the spinlock in the idle code path, but I don't have a
> better idea.

seqcount? It would avoid the obvious interleave and put most of the onus
on the reader (which never happens anyway).