Re: [PATCH v1] rcu: Fix and improve RCU read lock checks when !CONFIG_DEBUG_LOCK_ALLOC
From: Paul E. McKenney
Date: Fri Jul 14 2023 - 11:13:31 EST
On Fri, Jul 14, 2023 at 10:56:15AM -0400, Steven Rostedt wrote:
> On Fri, 14 Jul 2023 21:51:16 +0800
> Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx> wrote:
>
> > >> we need to work on
> > >> CONFIG_PREEMPT_COUNT=n (why not?), we could just always trigger a
> > >> workqueue for this.
> > >>
> > >
> > > So CONFIG_PREEMPT_COUNT=n users don't deserve good performance? ;-)
> >
> > I'm not sure if non-preemptible kernel users really care about
> > such sensitive latencies, I don't know, my 2 cents.
>
> CONFIG_PREEMPT_COUNT=n is for *performance* but not for *latency*. That is,
> they care about the overall performance (batch processing) but not
> interactive performance.
Users of CONFIG_PREEMPT_COUNT=n do care about latency, but normally not
in the sub-millisecond range. If the February posting is representative
(no idea, myself), these latencies are in the tens of milliseconds.
So one question is "why not both?"
One way would be for the call chain to indicate when in atomic context,
and another would be use of SRCU, to Joel's earlier point.
Thanx, Paul