[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <93F1BB73-8891-46EB-99E0-DD6C87209945@lca.pw>
Date: Wed, 4 Mar 2020 06:24:51 -0500
From: Qian Cai <cai@....pw>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, fweisbec@...il.com,
mingo@...nel.org, elver@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tick/sched: fix data races at tick_do_timer_cpu
> On Mar 4, 2020, at 4:56 AM, Peter Zijlstra <peterz@...radead.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?
Powered by blists - more mailing lists