summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-07-13 10:17:22 +0300
committerLeon Romanovsky <leon@kernel.org>2026-07-14 08:26:03 -0400
commit66073100a7b8576e5037cac117b2a3fd3d9946e7 (patch)
treea3a5fabb12de2ca178eac8dfa7fdb4773ff5524b /tools/perf/scripts/python/stackcollapse.py
parenteeb9697db6c16d9bb2ce7b7ddf95aa20305aa9f2 (diff)
RDMA/umem: ib_umem_get(): use kmalloc() to allocate page array
ib_umem_get() allocates an array of pointers to struct page for pin_user_pages_fast() calls during memory registration. This array can be allocated with kmalloc() as there's nothing special about it to go directly to the page allocator. kmalloc() provides a better API that does not require ugly casts and kfree() does not need to know the size of the freed object. Performance difference between kmalloc() and __get_free_pages() is not measurable as both allocators take an object/page from a per-CPU list for fast path allocations. For the slow path the performance is anyway determined by the amount of reclaim involved rather than by what allocator is used. Replace use of __get_free_page() with kmalloc() and free_page() with kfree(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Link: https://patch.msgid.link/20260713-b4-rdma-v2-1-65d2a1a5180c@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions