summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-07-13 10:17:25 +0300
committerLeon Romanovsky <leon@kernel.org>2026-07-14 08:26:03 -0400
commit45bf0b3da47d75b227c35e95bc0ee15857820fa9 (patch)
treecdad37bbd909b6b705f3634d1365b01435d24278 /tools/perf/scripts/python/netdev-times.py
parent5036553f0e39e298a761427e9b4dc30f951cb78d (diff)
IB/mthca: allocate mthca_array memory with kzalloc()
mthca_array is essentially a sparse array of pointers and there is no need to allocate its memory using 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_zeroed_page() with kzalloc() 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-4-65d2a1a5180c@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions