From: David Hildenbrand <david@redhat.com>
To: Kiryl Shutsemau <kas@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>,
akpm@linux-foundation.org, willy@infradead.org, hughd@google.com,
ziy@nvidia.com, baolin.wang@linux.alibaba.com,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
npache@redhat.com, ryan.roberts@arm.com, baohua@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: Enable khugepaged to operate on non-writable VMAs
Date: Mon, 1 Sep 2025 15:43:44 +0200 [thread overview]
Message-ID: <d8640bd6-1a72-4969-86de-e63736af53d8@redhat.com> (raw)
In-Reply-To: <csqlc5ajszg6bybykeezkpcfqlx7nv5ochikrgttzrhqqjaxjv@y2hwbmqu4qfr>
On 01.09.25 15:15, Kiryl Shutsemau wrote:
> On Mon, Sep 01, 2025 at 10:32:34AM +0200, David Hildenbrand wrote:
>>
>>>> @@ -676,9 +676,7 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
>>>> writable = true;
>>>> }
>>>> - if (unlikely(!writable)) {
>>>> - result = SCAN_PAGE_RO;
>>>> - } else if (unlikely(cc->is_khugepaged && !referenced)) {
>>>> + if (unlikely(cc->is_khugepaged && !referenced)) {
>>>> result = SCAN_LACK_REFERENCED_PAGE;
>>>> } else {
>>>> result = SCAN_SUCCEED;
>>>> @@ -1421,9 +1419,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,
>>>> mmu_notifier_test_young(vma->vm_mm, _address)))
>>>> referenced++;
>>>> }
>>>> - if (!writable) {
>>>> - result = SCAN_PAGE_RO;
>>>> - } else if (cc->is_khugepaged &&
>>>> + if (cc->is_khugepaged &&
>>>
>>> The only practical use of the writable is gone. The only other usage is
>>> tracing which can be dropped to as it is not actionable anymore.
>>>
>>> Could you drop writable? Maybe as a separate commit.
>>
>> I think we should just do it in the same patch.
>
> Change in trace_mm_collapse_huge_page_isolate() interface doesn't belong
> to the same patch in my view.
We frequently adjust tracing code (which is specific to khugepaged in
this case) in the same patch.
Anyhow, no strong opinion.
--
Cheers
David / dhildenb
next prev parent reply other threads:[~2025-09-01 13:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 7:48 [RFC PATCH] mm: Enable khugepaged to operate on non-writable VMAs Dev Jain
2025-09-01 8:23 ` Kiryl Shutsemau
2025-09-01 8:32 ` David Hildenbrand
2025-09-01 13:15 ` Kiryl Shutsemau
2025-09-01 13:43 ` David Hildenbrand [this message]
2025-09-01 8:39 ` Dev Jain
2025-09-01 8:32 ` David Hildenbrand
2025-09-01 8:50 ` Dev Jain
2025-09-01 15:26 ` Dev Jain
2025-09-01 15:35 ` 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=d8640bd6-1a72-4969-86de-e63736af53d8@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dev.jain@arm.com \
--cc=hughd@google.com \
--cc=kas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=npache@redhat.com \
--cc=ryan.roberts@arm.com \
--cc=willy@infradead.org \
--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 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).