[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <721ca866-0c80-496b-a823-ccdbb1f488d4@linux.alibaba.com>
Date: Fri, 5 Apr 2024 20:16:35 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Barry Song <21cnbao@...il.com>
Cc: akpm@...ux-foundation.org, mgorman@...hsingularity.net, vbabka@...e.cz,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: page_alloc: use the correct THP order for THP PCP
On 2024/4/5 12:53, Barry Song wrote:
> On Thu, Apr 4, 2024 at 2:47 AM Baolin Wang
> <baolin.wang@...ux.alibaba.com> wrote:
>>
>> Commit 44042b449872 ("mm/page_alloc: allow high-order pages to be stored
>> on the per-cpu lists") extends the PCP allocator to store THP pages, and
>> it determines whether to cache THP pags in PCP by comparing with pageblock_order.
>> But the pageblock_order is not always equal to THP order, it might also
>> be MAX_PAGE_ORDER, which could prevent PCP from caching THP pages.
>>
>> Therefore, using HPAGE_PMD_ORDER instead to determine the need for caching
>> THP for PCP can fix this issue
>>
>> Fixes: 44042b449872 ("mm/page_alloc: allow high-order pages to be stored on the per-cpu lists")
>> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
>
> LGTM,
> Reviewed-by: Barry Song <baohua@...nel.org>
>
> In the context of using mTHP, perhaps there arises a need for PCP
> allocation for frequently
> requested mTHP orders. These orders typically exceed PAGE_ALLOC_COSTLY_ORDER
> but are smaller than HPAGE_PMD_ORDER.
Yes, I have also considered this, but haven't found some time to do more
investigation and run some benchmarks.:) May be we can create a new
thread to talk about this first.
Powered by blists - more mailing lists