Re: [PATCH v6 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-24 Thread Joao Martins
On 2/24/22 15:41, Muchun Song wrote: > On Thu, Feb 24, 2022 at 3:48 AM Joao Martins > wrote: >> >> Currently memmap_init_zone_device() ends up initializing 32768 pages >> when it only needs to initialize 128 given tail page reuse. That >> number is worse with 1GB compound pages, 262144 instead of

Re: [PATCH v6 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-24 Thread Muchun Song
On Thu, Feb 24, 2022 at 3:48 AM Joao Martins wrote: > > Currently memmap_init_zone_device() ends up initializing 32768 pages > when it only needs to initialize 128 given tail page reuse. That > number is worse with 1GB compound pages, 262144 instead of 128. Update > memmap_init_zone_device() to sk

Re: [PATCH v6 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-24 Thread Joao Martins
On 2/24/22 05:57, Muchun Song wrote: > On Thu, Feb 24, 2022 at 3:48 AM Joao Martins > wrote: >> --- a/mm/page_alloc.c >> +++ b/mm/page_alloc.c >> @@ -6653,6 +6653,20 @@ static void __ref __init_zone_device_page(struct page >> *page, unsigned long pfn, >> } >> } >> >> +/* >> + * With com

Re: [PATCH v6 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-23 Thread Muchun Song
On Thu, Feb 24, 2022 at 3:48 AM Joao Martins wrote: > > Currently memmap_init_zone_device() ends up initializing 32768 pages > when it only needs to initialize 128 given tail page reuse. That > number is worse with 1GB compound pages, 262144 instead of 128. Update > memmap_init_zone_device() to sk

[PATCH v6 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-23 Thread Joao Martins
Currently memmap_init_zone_device() ends up initializing 32768 pages when it only needs to initialize 128 given tail page reuse. That number is worse with 1GB compound pages, 262144 instead of 128. Update memmap_init_zone_device() to skip redundant initialization, detailed below. When a pgmap @vme