Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/mm/percpu-km: drop nth_page() usage within single allocation

We're allocating a higher-order page from the buddy. For these pages
(that are guaranteed to not exceed a single memory section) there is no
need to use nth_page().

Link: https://lkml.kernel.org/r/20250901150359.867252-15-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
cb77aa60 372c9b54

+1 -1
+1 -1
mm/percpu-km.c
··· 69 69 } 70 70 71 71 for (i = 0; i < nr_pages; i++) 72 - pcpu_set_page_chunk(nth_page(pages, i), chunk); 72 + pcpu_set_page_chunk(pages + i, chunk); 73 73 74 74 chunk->data = pages; 75 75 chunk->base_addr = page_address(pages);