[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77fabe3b-2314-8826-a5a3-3a530f41eb0c@intel.com>
Date: Wed, 18 Dec 2019 18:48:28 +0100
From: Björn Töpel <bjorn.topel@...el.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>,
Björn Töpel <bjorn.topel@...il.com>
Cc: netdev@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
bpf@...r.kernel.org, davem@...emloft.net, hawk@...nel.org,
john.fastabend@...il.com, magnus.karlsson@...el.com,
jonathan.lemon@...il.com
Subject: Re: [PATCH bpf-next 2/8] xdp: simplify cpumap cleanup
On 2019-12-18 18:47, Jakub Kicinski wrote:
> On Wed, 18 Dec 2019 11:53:54 +0100, Björn Töpel wrote:
>> From: Björn Töpel <bjorn.topel@...el.com>
>>
>> After the RCU flavor consolidation [1], call_rcu() and
>> synchronize_rcu() waits for preempt-disable regions (NAPI) in addition
>> to the read-side critical sections. As a result of this, the cleanup
>> code in cpumap can be simplified
>>
>> * There is no longer a need to flush in __cpu_map_entry_free, since we
>> know that this has been done when the call_rcu() callback is
>> triggered.
>>
>> * When freeing the map, there is no need to explicitly wait for a
>> flush. It's guaranteed to be done after the synchronize_rcu() call
>> in cpu_map_free().
>>
>> [1] https://lwn.net/Articles/777036/
>>
>> Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
>
> Probably transient but:
>
> ../kernel/bpf/cpumap.c: In function "cpu_map_free":
> ../kernel/bpf/cpumap.c:502:6: warning: unused variable "cpu" [-Wunused-variable]
> 502 | int cpu;
> | ^~~
>
> I think there are also warnings in patch 4.
>
Ugh. Thanks, I'll respin!
Björn
Powered by blists - more mailing lists