diff options
author | Eric Dumazet <[email protected]> | 2024-02-24 09:06:30 +0000 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-02-27 08:31:28 -0800 |
commit | f8cbf6bde4c8d5d32330bcceafa7b139fec89f97 (patch) | |
tree | 81dbdbfeae33ceb76d38efbd09cf9f097258e071 /scripts/generate_rust_analyzer.py | |
parent | c4b04a802d8e3996e588cbbb47756b2f9d239d78 (diff) |
netlink: use kvmalloc() in netlink_alloc_large_skb()
This is a followup of commit 234ec0b6034b ("netlink: fix potential
sleeping issue in mqueue_flush_file"), because vfree_atomic()
overhead is unfortunate for medium sized allocations.
1) If the allocation is smaller than PAGE_SIZE, do not bother
with vmalloc() at all. Some arches have 64KB PAGE_SIZE,
while NLMSG_GOODSIZE is smaller than 8KB.
2) Use kvmalloc(), which might allocate one high order page
instead of vmalloc if memory is not too fragmented.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Zhengchao Shao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions