From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Dev Jain <dev.jain@arm.com>, akpm@linux-foundation.org, david@redhat.com
Cc: 21cnbao@gmail.com, ryan.roberts@arm.com, ziy@nvidia.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm: mincore: use pte_batch_bint() to batch process large folios
Date: Fri, 9 May 2025 15:38:12 +0800 [thread overview]
Message-ID: <653bd82d-6c61-4114-bbae-a5f79e811a43@linux.alibaba.com> (raw)
In-Reply-To: <42ab3f69-82d3-475f-b38d-8e75b2819865@arm.com>
On 2025/5/9 15:30, Dev Jain wrote:
>
>
> On 09/05/25 6:15 am, Baolin Wang wrote:
>> When I tested the mincore() syscall, I observed that it takes longer with
>> 64K mTHP enabled on my Arm64 server. The reason is the
>> mincore_pte_range()
>> still checks each PTE individually, even when the PTEs are contiguous,
>> which is not efficient.
>>
>> Thus we can use pte_batch_hint() to get the batch number of the present
>> contiguous PTEs, which can improve the performance. I tested the
>> mincore()
>> syscall with 1G anonymous memory populated with 64K mTHP, and observed an
>> obvious performance improvement:
>>
>> w/o patch w/ patch changes
>> 6022us 549us +91%
>>
>> Moreover, I also tested mincore() with disabling mTHP/THP, and did not
>> see any obvious regression for base pages.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
>
> Nit: The subject line - s/pte_batch_bint()/pte_batch_hint()
Ah, fat finger. Hope Andrew can help to fix it:)
> Otherwise LGTM
>
> Reviewed-by: Dev Jain <dev.jain@arm.com>
Thanks.
next prev parent reply other threads:[~2025-05-09 7:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 0:45 [PATCH v3] mm: mincore: use pte_batch_bint() to batch process large folios Baolin Wang
2025-05-09 1:49 ` Barry Song
2025-05-09 7:30 ` Dev Jain
2025-05-09 7:38 ` Baolin Wang [this message]
2025-05-09 7:51 ` David Hildenbrand
2025-05-09 12:25 ` Baolin Wang
2025-05-09 12:42 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=653bd82d-6c61-4114-bbae-a5f79e811a43@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.