[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXJAmz6TL8C5Q2=__5nxCBudDd_+NbnaabnB6+Tt79A3HyK9g@mail.gmail.com>
Date: Mon, 27 Jan 2025 11:12:58 -0800
From: John Ousterhout <ouster@...stanford.edu>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, horms@...nel.org,
kuba@...nel.org
Subject: Re: [PATCH net-next v6 04/12] net: homa: create homa_pool.h and homa_pool.c
On Mon, Jan 27, 2025 at 10:28 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 1/27/25 6:34 PM, John Ousterhout wrote:
> > On Mon, Jan 27, 2025 at 1:41 AM Paolo Abeni <pabeni@...hat.com> wrote:
> >> raw_* variants, alike __* ones, fall under the 'use at your own risk'
> >> category.
> >>
> >> In this specific case raw_smp_processor_id() is supposed to be used if
> >> you don't care the process being move on other cores while using the
> >> 'id' value.
> >>
> >> Using raw_smp_processor_id() and building with the CONFIG_DEBUG_PREEMPT
> >> knob, the generated code will miss run-time check for preemption being
> >> actually disabled at invocation time. Such check will be added while
> >> using smp_processor_id(), with no performance cost for non debug build.
> >
> > I'm pretty confident that the raw variant is safe. However, are you
> > saying that there is no performance advantage of the raw version in
> > production builds?
>
> Yes.
>
> > If so, then I might as well switch to the non-raw version.
>
> Please do. In fact using the raw variant when not needed will bring only
> shortcoming.
Will do. Just for my information, when is the raw variant "needed"?
-John-
Powered by blists - more mailing lists