From: Zi Yan <ziy@nvidia.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
willy@infradead.org, akpm@linux-foundation.org, hughd@google.com,
ljs@kernel.org, lance.yang@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: shmem: don't set large-order range for internal shmem mount
Date: Thu, 16 Apr 2026 09:57:32 -0400 [thread overview]
Message-ID: <48E18E39-B3D3-4BA7-9291-D9B293CD6CBD@nvidia.com> (raw)
In-Reply-To: <82c7ab7a-dc44-47a1-b13d-5119453bc82c@kernel.org>
On 16 Apr 2026, at 4:44, David Hildenbrand (Arm) wrote:
> On 4/16/26 04:08, Baolin Wang wrote:
>>
>>
>> On 4/16/26 9:52 AM, Zi Yan wrote:
>>> On 15 Apr 2026, at 21:45, Baolin Wang wrote:
>>>
>>>>
>>>> Personally, I still prefer the current fix (commit 5a90c155defa). We
>>>> should honor the tmpfs mount option. If it explicitly says no large
>>>> folios, we shouldn’t call mapping_set_large_folios(). Isn’t that more
>>>> consistent with its semantics?
>>>
>>> Filesystems wishing to turn on large folios in the pagecache should call
>>> ``mapping_set_large_folios`` when initializing the incore inode.
>>>
>>> You mean tmpfs with huge option set is a FS wishing to turn on large
>>> folios in the pagecache, otherwise it is a FS wishing not to have
>>> large folio
>>> in the pagecache. tmpfs with different options is seen as different FSes.
>>
>> What I mean is that tmpfs is somewhat different from other filesystems.
>> We have tried to make tmpfs behave like other FSes, but differences
>> remain. For example, the previous fix to tmpfs’s large folio allocation
>> policy, see commit 69e0a3b49003 ("mm: shmem: fix the strategy for the
>> tmpfs 'huge=' options").
>>
>> So the tmpfs specific 'huge=' mount option is another way it differs
>> from other filesystems.
>
> Personally I'm fine just not calling mapping_set_large_folios() on
> mappings where there must not ever be large folios.
>
> But for every other mapping where there might be large folios at some
> point, we should just set it.
Sounds good to me too.
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2026-04-16 13:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 8:22 Baolin Wang
2026-04-15 8:47 ` David Hildenbrand (Arm)
2026-04-15 9:04 ` Baolin Wang
2026-04-15 9:19 ` David Hildenbrand (Arm)
2026-04-15 9:41 ` Baolin Wang
2026-04-15 9:54 ` David Hildenbrand (Arm)
2026-04-15 10:05 ` Baolin Wang
2026-04-15 14:36 ` David Hildenbrand (Arm)
2026-04-16 1:05 ` Baolin Wang
2026-04-16 1:11 ` Zi Yan
2026-04-16 1:22 ` Baolin Wang
2026-04-16 1:36 ` Zi Yan
2026-04-16 1:45 ` Baolin Wang
2026-04-16 1:52 ` Zi Yan
2026-04-16 2:08 ` Baolin Wang
2026-04-16 8:44 ` David Hildenbrand (Arm)
2026-04-16 13:57 ` Zi Yan [this message]
2026-04-15 13:45 ` Matthew Wilcox
2026-04-16 1:02 ` Baolin Wang
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=48E18E39-B3D3-4BA7-9291-D9B293CD6CBD@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=hughd@google.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=willy@infradead.org \
/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