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

From: Jakub Kicinski
Date: Wed Jun 05 2024 - 22:54:29 EST


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.

Andrew, wasn't it on your TODO list to send the update to the docs? :)