Re: [PATCH v2 2/5] time/sched_clock: Broaden sched_clock()'s instrumentation coverage

From: Peter Zijlstra
Date: Tue Nov 05 2024 - 04:36:10 EST


On Tue, Nov 05, 2024 at 10:22:51AM +0100, Marco Elver wrote:
> Oops, typo'd the commit message:
>
> On Mon, 4 Nov 2024 at 17:19, Marco Elver <elver@xxxxxxxxxx> wrote:
> >
> > Most of sched_clock()'s implementation is ineligible for instrumentation
> > due to relying on sched_clock_noinstr().
> >
> > Split the implementation off into an __always_inline function
> > __sched_clock(), which is then used by the noinstr and instrumentable
> > version, to allow more of sched_clock() to be covered by various
> > instrumentation.
> >
> > This will allow instrumentation with the various sanitizers (KASAN,
> > KCSAN, KMSAN, UBSAN). For KCSAN, we know that raw seqcount_latch usage
> > without annotations will result in false positive reports: tell it that
> > all of __sched_clock() is "atomic" for the latch writer; later changes
>
> s/writer/reader/
>
> > in this series will take care of the readers.
>
> s/readers/writers/
>
> ... might be less confusing. If you apply, kindly fix up the commit
> message, so that future people will be less confused. The code comment
> is correct.

So done. Thanks!