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

2022-02-12 Thread Muchun Song
On Fri, Feb 11, 2022 at 8:48 PM Joao Martins wrote: > > On 2/11/22 05:07, Muchun Song wrote: > > On Fri, Feb 11, 2022 at 3:34 AM Joao Martins > > wrote: > >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c > >> index cface1d38093..c10df2fd0ec2 100644 > >> --- a/mm/page_alloc.c > >> +++ b/mm/page_

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

2022-02-11 Thread Joao Martins
On 2/11/22 05:07, Muchun Song wrote: > On Fri, Feb 11, 2022 at 3:34 AM Joao Martins > wrote: >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >> index cface1d38093..c10df2fd0ec2 100644 >> --- a/mm/page_alloc.c >> +++ b/mm/page_alloc.c >> @@ -,6 +,20 @@ static void __ref __init_zone_devic

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

2022-02-10 Thread Muchun Song
On Fri, Feb 11, 2022 at 3:34 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 v5 5/5] mm/page_alloc: reuse tail struct pages for compound devmaps

2022-02-10 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