Messages in this thread | | | From | Qian Cai <> | Subject | Re: [PATCH] tick/sched: fix data races at tick_do_timer_cpu | Date | Wed, 4 Mar 2020 06:24:51 -0500 |
| |
> On Mar 4, 2020, at 4:56 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > Worse: > > + if (cpu != READ_ONCE(tick_do_timer_cpu) && > + (READ_ONCE(tick_do_timer_cpu) != TICK_DO_TIMER_NONE || > > Doing that read twice is just utterly stupid. And the patch is full of > that :/ > > Please stop this non-thinking 'fix' generation!
That is an oversight that could easily be fixed. However, blaming about “non-thinking” is rather harsh. Do you know I had spent weeks reading about memory-model.txt and alike just to get better at it?
| |