Re: [PATCH v4 7/8] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-06-24 12:32:36
Also in:
linux-s390, lkml, sparclinux
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-06-24 12:32:36
Also in:
linux-s390, lkml, sparclinux
On Wed, Jun 24, 2020 at 12:17:56PM +0200, Marco Elver wrote:
On Wed, 24 Jun 2020 at 11:01, Peter Zijlstra [off-list ref] wrote:
quoted
And I figured a quick way to get rid of that would be something like the below, seeing how volatile gets auto annotated... but that doesn't seem to actually work. What am I missing?There's one more in include/linux/rcupdate.h. I suggested this at some point: https://lore.kernel.org/lkml/20200220213317.GA35033@google.com/ (local) To avoid volatiles as I don't think they are needed here.
Urgghh.. local_t is very expensive for this. The current code is actually fine, even on load-store architectures. Using local_t will only result in it being more expensive for no gain. I'll go put data_race() around it.