From: Zhang Yi <yi.zhang@huaweicloud.com>
To: David Hildenbrand <david@redhat.com>,
Karol Wachowski <karol.wachowski@linux.intel.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-mm@kvack.org,
linux-ext4@vger.kernel.org
Subject: Re: Possible regression in pin_user_pages_fast() behavior after commit 7ac67301e82f ("ext4: enable large folio for regular file")
Date: Thu, 23 Oct 2025 15:34:10 +0800 [thread overview]
Message-ID: <f718868a-563f-41b0-bdef-b0a2a98877ce@huaweicloud.com> (raw)
In-Reply-To: <41f30998-e498-4c33-a4b4-99b9f7339fd7@redhat.com>
On 10/23/2025 3:24 PM, David Hildenbrand wrote:
>>> __split_huge_pmd_locked() contains that handling.
>>>
>>> We have to do that because we did not preallocate a page table we can just throw in.
>>>
>>> We could do that on this path instead: remap the PMD to be mapped by a PTE table. We'd have to preallocate a page table.
>>>
>>> That would avoid the do_pte_missing() below for such faults.
>>>
>>> that could be done later on top of this fix.
>>
>> Yeah, thank you for the explanation! I have another question, just curious.
>> Why do we have to fall back to installing the PTE table instead of creating
>> a new anonymous large folio (2M) and setting a new leaf huge PMD?
>
> Primarily because it would waste more memory for various use cases, on a factor of 512.
>
Ha, I got it, that makes sense! :-)
Thanks,
Yi.
prev parent reply other threads:[~2025-10-23 7:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 13:24 Possible regression in pin_user_pages_fast() behavior after commit 7ac67301e82f ("ext4: enable large folio for regular file") Karol Wachowski
2025-10-17 13:30 ` Karol Wachowski
2025-10-20 7:11 ` Zhang Yi
2025-10-20 8:47 ` Karol Wachowski
2025-10-22 2:46 ` Zhang Yi
2025-10-22 8:30 ` David Hildenbrand
2025-10-23 3:04 ` Zhang Yi
2025-10-23 7:24 ` David Hildenbrand
2025-10-23 7:34 ` Zhang Yi [this message]
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=f718868a-563f-41b0-bdef-b0a2a98877ce@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=david@redhat.com \
--cc=karol.wachowski@linux.intel.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).