Re: [PATCH -next] x86/mm/pat: silence a data race in cpa_4k_install

From: Qian Cai
Date: Wed Jan 22 2020 - 21:15:12 EST




> On Jan 22, 2020, at 3:46 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Documentation. It is a clear and concise marker of intent. Unintended
> data races are bad.
>
> Also, we've been adding annotations to the kernel source forever,
> sparse, lockdep, etc.. now KCSAN. All we have to do is make sure they're
> minimally invasive, and in that regard the date_race() marker is spot on
> IMO.

Okay, so which way should we move forward with this then? Borislav liked __no_kasan_or_inline and Peter liked data_race(). I personally like data_race() more because it has nothing to do with the GCC bug, but I realized my opinion has little weight here.