netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: skbuff: allocate the fclone in the current NUMA node
@ 2024-02-20  2:18 Huang Shijie
  2024-02-20  5:32 ` Eric Dumazet
  2024-02-26 10:10 ` [PATCH] net: skbuff: allocate the fclone in the current NUMA node Alexander Lobakin
  0 siblings, 2 replies; 19+ messages in thread
From: Huang Shijie @ 2024-02-20  2:18 UTC (permalink / raw)
  To: kuba
  Cc: patches, davem, horms, edumazet, ast, dhowells, linyunsheng,
	aleksander.lobakin, linux-kernel, netdev, cl, Huang Shijie

The current code passes NUMA_NO_NODE to __alloc_skb(), we found
it may creates fclone SKB in remote NUMA node.

So use numa_node_id() to limit the allocation to current NUMA node.

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
---
 include/linux/skbuff.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2dde34c29203..ebc42b2604ad 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1343,7 +1343,7 @@ static inline bool skb_fclone_busy(const struct sock *sk,
 static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
 					       gfp_t priority)
 {
-	return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE);
+	return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, numa_node_id());
 }
 
 struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-02-29 17:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20  2:18 [PATCH] net: skbuff: allocate the fclone in the current NUMA node Huang Shijie
2024-02-20  5:32 ` Eric Dumazet
2024-02-20  6:26   ` Shijie Huang
2024-02-20  8:17     ` Eric Dumazet
2024-02-20  8:37       ` Shijie Huang
2024-02-24 19:07         ` Eric Dumazet
2024-02-26 10:18           ` Jesper Dangaard Brouer
2024-02-26 10:29             ` Eric Dumazet
2024-02-27  6:28   ` [PATCH v2] net: skbuff: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache Huang Shijie
2024-02-27 12:55     ` Eric Dumazet
2024-02-27 13:15       ` Eric Dumazet
2024-02-28  7:05       ` Shijie Huang
2024-02-28  9:38         ` Eric Dumazet
2024-02-29 17:00         ` Christoph Lameter (Ampere)
2024-02-29 17:07           ` Eric Dumazet
2024-02-29 17:57             ` Christoph Lameter (Ampere)
2024-02-29 16:56     ` Christoph Lameter (Ampere)
2024-02-26 10:10 ` [PATCH] net: skbuff: allocate the fclone in the current NUMA node Alexander Lobakin
2024-02-27  6:30   ` Shijie Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).