summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-09-06 11:27:11 +0300
committerJanosch Frank <frankja@linux.ibm.com>2026-09-28 13:35:17 +0000
commitc81d01be22c48a8a6572336c975e90d64dea181c (patch)
tree3bbae08c91d8ba11d316149041f6dafefc97544d /tools/perf/scripts/python
parenta9107d97c229a674fb0cb6a065eb2a292ce77665 (diff)
downloadlinux-next-c81d01be22c48a8a6572336c975e90d64dea181c.tar.gz
linux-next-c81d01be22c48a8a6572336c975e90d64dea181c.zip
KVM: s390: Replace get_zeroed_page() with kzalloc() for the GIB
kvm_s390_gib_init() allocates the guest information block (GIB). The GIB is passed to the hardware as a physical address and must be page aligned. kmalloc() guarantees that a power of two sized allocation is aligned to its size, so a PAGE_SIZE allocation is page aligned as well. This buffer 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_zeroed_page() with kzalloc() and free_page() with kfree(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Assisted-by: copilot:claude-opus Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions