Re: [PATCH v1 14/36] mm/mm/percpu-km: drop nth_page() usage within single allocation
"Liam R. Howlett" <[email protected]> Fri, 29 Aug 2025 10:59:09 -0400
| Newsgroups | com.zx2c4.lists.wireguard,dev.linux.lists.iommu,dev.linux.lists.virtualization,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.io-uring,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-ide,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-mips,org.kernel.vger.linux-mmc,org.kernel.vger.linux-s390,org.kernel.vger.linux-scsi,org.kernel.vger.netdev,org.kvack.linux-mm |
|---|---|
| Message-ID | <2vgbxodabnlvacqoiythb2jsvgp3mhgvkv6od4t6nw4unauhc3@vwqvplaiqk5f> |
* David Hildenbrand <[email protected]> [250827 18:06]: > 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(). > > Signed-off-by: David Hildenbrand <[email protected]> Acked-by: Liam R. Howlett <[email protected]> > --- > mm/percpu-km.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/percpu-km.c b/mm/percpu-km.c > index fe31aa19db81a..4efa74a495cb6 100644 > --- a/mm/percpu-km.c > +++ b/mm/percpu-km.c > @@ -69,7 +69,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) > } > > for (i = 0; i < nr_pages; i++) > - pcpu_set_page_chunk(nth_page(pages, i), chunk); > + pcpu_set_page_chunk(pages + i, chunk); > > chunk->data = pages; > chunk->base_addr = page_address(pages); > -- > 2.50.1 >