diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-09-16 15:03:13 +0300 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-09-22 12:40:30 +0200 |
| commit | db111020cc720a39480f67b9bb8308dd7c0c7099 (patch) | |
| tree | 8a2da21edc2cb003fb8678ff5344fbdaf901958a /tools/perf/scripts/python/stackcollapse.py | |
| parent | a59ccfb427c60d25ca1e5039e3d4e22f65acc51e (diff) | |
| download | linux-db111020cc720a39480f67b9bb8308dd7c0c7099.tar.gz linux-db111020cc720a39480f67b9bb8308dd7c0c7099.zip | |
s390/cmf: Use kmalloc() for the CMB area
alloc_cmb() allocates the channel measurement block area shared by
devices using the basic channel measurement format.
This memory 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 measurement block origin must be 32-byte aligned. Each CMB is
32 bytes, so kmalloc() provides the required alignment without rounding
the allocation to a power-of-two number of pages. Reject an empty area
before allocating it.
Replace use of __get_free_pages() with kmalloc() and free_pages() 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: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
