Re: [PATCH v4 net-next 03/14] net: Use nested-BH locking for napi_alloc_cache.

From: Sebastian Andrzej Siewior
Date: Thu Jun 06 2024 - 02:22:50 EST


On 2024-06-05 19:54:20 [-0700], Jakub Kicinski wrote:
> On Tue, 4 Jun 2024 17:24:10 +0200 Sebastian Andrzej Siewior wrote:
> > @@ -308,6 +311,7 @@ void *__napi_alloc_frag_align(unsigned int fragsz, unsigned int align_mask)
> > struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
> >
> > fragsz = SKB_DATA_ALIGN(fragsz);
> > + guard(local_lock_nested_bh)(&napi_alloc_cache.bh_lock);
> >
> > return __page_frag_alloc_align(&nc->page, fragsz, GFP_ATOMIC,
> > align_mask);
>
> We have decided to advise against the use of guard() in networking,
> at least for now.

Understood.

> Andrew, wasn't it on your TODO list to send the update to the docs? :)
I can add it to
Documentation/process/maintainer-netdev.rst

Yes, no, Andrew?

Sebastian