summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-05-27 17:33:28 +0300
committerJens Axboe <axboe@kernel.dk>2026-05-27 08:34:32 -0600
commit17d7492a50251d913ae7101f898cf30ede856cde (patch)
tree1b233540b861543f005bebe5d6fb450e197fd610 /include/linux/debugobjects.h
parentfb0eeeed91f3236133383445fee5cc8f20330e6e (diff)
block: partitions: replace __get_free_page() with kmalloc()
check_partition() allocates a buffer to use as backing memory for seq_buf. 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. For a single allocation on the cold path the 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/20260527-block-v2-1-8e06f914c484@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions