[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230206173103.2617121-1-edumazet@google.com>
Date: Mon, 6 Feb 2023 17:30:59 +0000
From: Eric Dumazet <edumazet@...gle.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
Soheil Hassas Yeganeh <soheil@...gle.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: [PATCH v2 net-next 0/4] net: core: use a dedicated kmem_cache for skb
head allocs
Our profile data show that using kmalloc(non_const_size)/kfree(ptr)
has a certain cost, because kfree(ptr) has to pull a 'struct page'
in cpu caches.
Using a dedicated kmem_cache for TCP skb->head allocations makes
a difference, both in cpu cycles and memory savings.
This kmem_cache could also be used for GRO skb allocations,
this is left as a future exercise.
v2: addressed compile error with CONFIG_SLOB=y (kernel bots)
Changed comment (Jakub)
Eric Dumazet (4):
net: add SKB_HEAD_ALIGN() helper
net: remove osize variable in __alloc_skb()
net: factorize code in kmalloc_reserve()
net: add dedicated kmem_cache for typical/small skb->head
include/linux/skbuff.h | 8 +++
net/core/skbuff.c | 115 +++++++++++++++++++++++++++++------------
2 files changed, 90 insertions(+), 33 deletions(-)
--
2.39.1.519.gcb327c4b5f-goog
Powered by blists - more mailing lists