lkml.org 
[lkml]   [2020]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tick/sched: fix data races at tick_do_timer_cpu
Date


> 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?
\
 
 \ /
  Last update: 2020-03-04 12:26    [W:0.094 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site