linux-stable/include
Paolo Abeni dbae2b0628 net: skb: introduce and use a single page frag cache
After commit 3226b158e6 ("net: avoid 32 x truesize under-estimation
for tiny skbs") we are observing 10-20% regressions in performance
tests with small packets. The perf trace points to high pressure on
the slab allocator.

This change tries to improve the allocation schema for small packets
using an idea originally suggested by Eric: a new per CPU page frag is
introduced and used in __napi_alloc_skb to cope with small allocation
requests.

To ensure that the above does not lead to excessive truesize
underestimation, the frag size for small allocation is inflated to 1K
and all the above is restricted to build with 4K page size.

Note that we need to update accordingly the run-time check introduced
with commit fd9ea57f4e ("net: add napi_get_frags_check() helper").

Alex suggested a smart page refcount schema to reduce the number
of atomic operations and deal properly with pfmemalloc pages.

Under small packet UDP flood, I measure a 15% peak tput increases.

Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Suggested-by: Alexander H Duyck <alexanderduyck@fb.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://lore.kernel.org/r/6b6f65957c59f86a353fc09a5127e83a32ab5999.1664350652.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-09-29 18:48:15 -07:00
..
acpi Merge branch 'acpi-properties' 2022-08-11 19:21:03 +02:00
asm-generic arm64 fixes for -rc7 2022-09-23 15:28:51 -07:00
clocksource
crypto for-5.20/block-2022-08-04 2022-08-04 20:00:14 -07:00
drm drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets 2022-09-02 16:38:51 +03:00
dt-bindings power supply and reset changes for the v6.0 series 2022-08-12 09:37:33 -07:00
keys
kunit kunit: fix assert_type for comparison macros 2022-09-01 13:00:32 -06:00
kvm
linux net: skb: introduce and use a single page frag cache 2022-09-29 18:48:15 -07:00
math-emu
media SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
memory
misc
net net: Fix incorrect address comparison when searching for a bind2 bucket 2022-09-28 18:52:17 -07:00
pcmcia
ras mm, hwpoison: enable memory error handling on 1GB hugepage 2022-08-08 18:06:44 -07:00
rdma dma-mapping updates 2022-08-06 10:56:45 -07:00
rv
scsi scsi: core: Fix a use-after-free 2022-09-01 01:02:10 -04:00
soc net: dsa: felix: add support for changing DSA master 2022-09-20 10:32:36 +02:00
sound
target
trace ARM: SoC fixes for 6.0-rc6 2022-09-22 11:10:11 -07:00
uapi docs: netlink: clarify the historical baggage of Netlink flags 2022-09-29 18:39:39 -07:00
ufs scsi: ufs: core: Enable link lost interrupt 2022-08-11 22:04:32 -04:00
vdso
video
xen x86/xen: Add support for HVMOP_set_evtchn_upcall_vector 2022-08-12 11:28:21 +02:00