Thread (11 messages) 11 messages, 3 authors, 2022-09-22

Re: [PATCH net-next] net: skb: introduce and use a single page frag cache

From: Paolo Abeni <pabeni@redhat.com>
Date: 2022-09-22 16:29:20

On Wed, 2022-09-21 at 14:44 -0700, Alexander Duyck wrote:
On Wed, Sep 21, 2022 at 1:52 PM Paolo Abeni [off-list ref] wrote:
quoted
In that case we will still duplicate a bit of code  -
this_cpu_ptr(&napi_alloc_cache) on both branches. gcc 11.3.1 here says
that the generated code is smaller without this change.
Why do you need to duplicate it? 
The goal was using a single local variable to track the napi cache and
the memory info. I thought ("was sure") that keeping two separate
variables ('nc' and 'page_frag' instead of 'nc' and 'pfmemalloc') would
produce the same amount of code. gcc says I'm wrong and you are right
;)

I'll use that in v2, thanks!

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help