From: Rongwei Wang <rongwei.wang@linux.alibaba.com>
To: Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
viro@zeniv.linux.org.uk, song@kernel.org,
william.kucharski@oracle.com, hughd@google.com,
shy828301@gmail.com, linmiaohe@huawei.com, peterx@redhat.com
Subject: Re: [PATCH 0/3] mm, thp: introduce a new sysfs interface to facilitate file THP for .text
Date: Tue, 12 Oct 2021 15:04:21 +0800 [thread overview]
Message-ID: <48159eb1-61f7-09df-9bea-5933a283f972@linux.alibaba.com> (raw)
In-Reply-To: <YWTp7yjaN8W//Zrf@casper.infradead.org>
On 10/12/21 9:50 AM, Matthew Wilcox wrote:
> On Mon, Oct 11, 2021 at 09:06:37AM +0100, Christoph Hellwig wrote:
>> Can we please just get proper pagecache THP (through folios) merged
>> instead of piling hacks over hacks here? The whole readonly THP already
>> was more than painful enough due to all the hacks involved.
>
> This was my initial reaction too.
>
> But read the patches. They're nothing to do with the implementation of
> THP / folios in the page cache. They're all to make sure that mappings
> are PMD aligned.
Hi, Matthew
In fact, we had thought about realizing this by handling page cache
directly. And then, we found that we just need to align the mapping
address and make khugepaged can scan these 'mm_struct' base on
READ_ONLY_THP_FOR_FS.
>
> I think there's a lot to criticise in the patches (eg, a system-wide
> setting is probably a bad idea. and a lot of this stuff seems to
At the beginning, we don't introduce the new sysfs interface, just
re-use 'transparent_hugepage/enabled'. But In some production system, they
disable the THP directly, especially those applications that are
sensitive to THP. So, Considering these scenarios, we had to design a
new sysfs interface ('transparent_hugepage/hugetext_enabled').
And if you have other idea, we are willing to take to improve these patches.
Thanks!
> be fixing userspace bugs in the kernel). But let's criticise what's
> actually in the patches, because these are problems that exist regardless
> of RO_THP vs folios.
>
prev parent reply other threads:[~2021-10-12 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 9:26 Rongwei Wang
2021-10-09 9:26 ` [PATCH 1/3] mm, thp: support binaries transparent use of file THP Rongwei Wang
2021-10-09 9:26 ` [PATCH 2/3] mm, thp: make mapping address of libraries THP align Rongwei Wang
2021-10-09 9:26 ` [PATCH 3/3] mm, thp: make mapping address of PIC binaries " Rongwei Wang
2021-10-11 8:06 ` [PATCH 0/3] mm, thp: introduce a new sysfs interface to facilitate file THP for .text Christoph Hellwig
2021-10-12 1:50 ` Matthew Wilcox
2021-10-12 7:04 ` Rongwei Wang [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=48159eb1-61f7-09df-9bea-5933a283f972@linux.alibaba.com \
--to=rongwei.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=shy828301@gmail.com \
--cc=song@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=william.kucharski@oracle.com \
--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