Thread (22 messages) 22 messages, 4 authors, 2024-06-06

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

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-06-06 02:54:21
Also in: lkml

On Tue,  4 Jun 2024 17:24:10 +0200 Sebastian Andrzej Siewior wrote:
quoted hunk ↗ jump to hunk
@@ -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? :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help