Re: [PATCH] tick: use READ_ONCE() to read jiffies in concurrent environment

From: linke li
Date: Fri Mar 08 2024 - 03:47:40 EST


I am really sorry for making a confusing commit log.

>
> This patch finds nothing. Explain it correctly why it matters that the
> first read is not marked READ_ONCE(). Is this solving a correctness
> problem or are you adding it just to shut up the KCSAN warning?
>

The first read on jiffies is a racy read, and is expected to be racy.
So Mark data races to pwd->triggered as benign using READ_ONCE. This
patch aiming at reducing the number of benign races reported by KCSAN
in order to focus future debugging effort on harmful races.