From: Matthew Wilcox <willy@infradead.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: xu.xin16@zte.com.cn, akpm@linux-foundation.org,
chengming.zhou@linux.dev, hughd@google.com,
wang.yaxin@zte.com.cn, yang.yang29@zte.com.cn,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: ksm: initialize rmap values directly and make them const
Date: Fri, 6 Feb 2026 18:49:25 +0000 [thread overview]
Message-ID: <aYY3tZmsIQnT0b3V@casper.infradead.org> (raw)
In-Reply-To: <3192eca4-1c90-44ed-8386-bf635db357c4@kernel.org>
On Fri, Feb 06, 2026 at 07:09:56PM +0100, David Hildenbrand (Arm) wrote:
> On 2/6/26 18:34, David Hildenbrand (Arm) wrote:
> > On 2/6/26 16:29, Matthew Wilcox wrote:
> > > On Fri, Feb 06, 2026 at 03:22:54PM +0800, xu.xin16@zte.com.cn wrote:
> > > > make them const to make code more robust. Besides, since KSM
> > > > folios are always
> > > > order-0, so folio_nr_pages(KSM folio) is always 1, so the line:
> > > >
> > > > "pgoff_end = pgoff_start + folio_nr_pages(folio) - 1;"
> > > >
> > > > becomes directly:
> > > >
> > > > "pgoff_end = pgoff_start;"
> > >
> > > How do you know KSM folios will always be order 0? I don't. NAK this
> > > change.
> >
> > Once that changes we can revisit. ACK from me stands.
>
> And just to elaborate a bit: I don't see support for > 0 happening any time
> soon, and it will require significant changes that I am not even sure we
> would want to maintain upstream :)
OK, you're the KSM maintainer. There doesn't seem to be anywhere else
in the KSM code which handles large folios, so this is just removing
code that was recently added?
next prev parent reply other threads:[~2026-02-06 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 7:22 xu.xin16
2026-02-06 8:18 ` David Hildenbrand (Arm)
2026-02-06 8:38 ` xu.xin16
2026-02-06 8:46 ` David Hildenbrand (Arm)
2026-02-06 15:39 ` Andrew Morton
2026-02-06 15:29 ` Matthew Wilcox
2026-02-06 17:34 ` David Hildenbrand (Arm)
2026-02-06 18:09 ` David Hildenbrand (Arm)
2026-02-06 18:49 ` Matthew Wilcox [this message]
2026-02-06 18:57 ` David Hildenbrand (Arm)
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=aYY3tZmsIQnT0b3V@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=david@kernel.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wang.yaxin@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/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