[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <595520fc-d456-4e62-9c39-947ccfb86d0d@redhat.com>
Date: Mon, 27 Jan 2025 19:28:25 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: John Ousterhout <ouster@...stanford.edu>
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 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.
/P
Powered by blists - more mailing lists