On Sun, Aug 27, 2023 at 08:33:39AM +0100, Lorenzo Stoakes wrote: > > @@ -785,25 +785,23 @@ __perf_mmap_to_page(struct perf_buffer *rb, unsigned long pgoff) > > return virt_to_page(rb->data_pages[pgoff - 1]); > > } > > > > -static void *perf_mmap_alloc_page(int cpu) > > +static void *perf_mmap_alloc_page(int node) > > Nitty point but since we're dealing with folios here maybe rename to > perf_mmap_alloc_folio()? Since it's an explicit order-0 allocation, does that really make sense? > > { > > - struct page *page; > > - int node; > > + struct folio *folio; > > > > - node = (cpu == -1) ? cpu : cpu_to_node(cpu); > > - page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); > > - if (!page) > > + folio = __folio_alloc_node(GFP_KERNEL | __GFP_ZERO, 0, node); > > + if (!folio) > > return NULL; > > > > - return page_address(page); > > + return folio_address(folio); > > }