summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-09-06 11:27:09 +0300
committerJanosch Frank <frankja@linux.ibm.com>2026-09-28 13:35:18 +0000
commit6231b7956f897f099bc4a6dd9bfd2a821680a006 (patch)
tree81a2aaabe007fce8868f8ea768fe0524039b52a3 /tools/perf/scripts/python/flamegraph.py
parent065f89c6e3edd36825884f866699a05668f1e91e (diff)
downloadlinux-next-6231b7956f897f099bc4a6dd9bfd2a821680a006.tar.gz
linux-next-6231b7956f897f099bc4a6dd9bfd2a821680a006.zip
KVM: s390: Replace get_zeroed_page() with kzalloc() for the STHYI buffer
handle_sthyi() allocates the buffer that receives the STHYI response block before it is copied to the guest. 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. The only goto in that function does not unwind anything, it merely skips to the exit when the function code is invalid. Turn it into an early return so that the buffer can be freed with __free(kfree). Replace use of get_zeroed_page() with kzalloc() and free_page() with kfree(). Assisted-by: copilot:claude-opus Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions