From: Kiryl Shutsemau <kas@kernel.org>
To: David Hildenbrand <david@redhat.com>
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 14:15:51 +0100 [thread overview]
Message-ID: <csqlc5ajszg6bybykeezkpcfqlx7nv5ochikrgttzrhqqjaxjv@y2hwbmqu4qfr> (raw)
In-Reply-To: <9c3a2ecd-ceae-4e87-a6d7-6a7121ab7a15@redhat.com>
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.
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2025-09-01 13:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 7:48 Dev Jain
2025-09-01 8:23 ` Kiryl Shutsemau
2025-09-01 8:32 ` David Hildenbrand
2025-09-01 13:15 ` Kiryl Shutsemau [this message]
2025-09-01 13:43 ` David Hildenbrand
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=csqlc5ajszg6bybykeezkpcfqlx7nv5ochikrgttzrhqqjaxjv@y2hwbmqu4qfr \
--to=kas@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=hughd@google.com \
--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