Messages in this thread Patch in this message | | | From | Huang Shijie <> | Subject | [PATCH v2] net: skbuff: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache | Date | Tue, 27 Feb 2024 14:28:33 +0800 |
| |
Since we do not set FLAG_SKB_NO_MERGE for skbuff_fclone_cache, the current skbuff_fclone_cache maybe not really allocated, it maybe used an exist old kmem_cache. In NUMA, the fclone allocated by alloc_skb_fclone() maybe in remote node.
So set FLAG_SKB_NO_MERGE for skbuff_fclone_cache to fix it.
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com> --- v1 --> v2: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache in initialization.
v1: https://lkml.org/lkml/2024/2/20/121 --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1f918e602bc4..5e3e130fb57a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -5013,7 +5013,8 @@ void __init skb_init(void) skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", sizeof(struct sk_buff_fclones), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC, + SLAB_HWCACHE_ALIGN|SLAB_PANIC| + FLAG_SKB_NO_MERGE, NULL); /* usercopy should only access first SKB_SMALL_HEAD_HEADROOM bytes. * struct skb_shared_info is located at the end of skb->head, -- 2.40.1
| |