summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-08-30 10:48:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-01 14:07:53 +0200
commit2390a07e8e1ffca3d15a6c6b3098190450a508e7 (patch)
treed7270ff9598aa2035e638173d60410b31ae0d5c2 /tools/lib/python/kdoc/python_version.py
parent6bdf9b24b3524b214cd98705262cb84544955ed2 (diff)
platform: goldfish: pipe: replace __get_free_page() with kmalloc()
goldfish_pipe_open() allocates the per-pipe command buffer and goldfish_pipe_device_init() allocates the buffers the device shares with the host. Both are passed to the host as physical addresses and must be physically contiguous, which kmalloc() guarantees. These buffers can be allocated with kmalloc() as there's nothing special about them 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. While on it, size both allocations after the structures they hold instead of always taking a full page. 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 Assisted-by: copilot:claude-opus Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Link: https://patch.msgid.link/20260830-char-misc-v1-4-05e2ce44f291@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions