summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-08-30 11:10:40 +0300
committerJohan Hovold <johan@kernel.org>2026-09-08 11:08:17 +0200
commit6583f9741341b98ade67aa764794a02fea1eb7db (patch)
treefc0d948748f93e12863fa5b43515fe46f986e309 /tools/perf/scripts/python
parentdf2908090cda368b01ff43709f51890076c56157 (diff)
downloadlinux-next-6583f9741341b98ade67aa764794a02fea1eb7db.tar.gz
linux-next-6583f9741341b98ade67aa764794a02fea1eb7db.zip
USB: serial: wwan: replace __get_free_page() with kmalloc()
usb_wwan_port_probe() allocates the transfer buffers for the read URBs. 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, allocate IN_BUFLEN bytes rather than a full page. IN_BUFLEN is the transfer_buffer_length of the read URBs, the page allocator was only used because IN_BUFLEN happens to equal PAGE_SIZE on x86. 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> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions