linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Nimrod Oren <noren@nvidia.com>
Cc: Zi Yan <ziy@nvidia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Nico Pache <npache@redhat.com>,
	 Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>,
	 Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	 Liu Song <liusong@linux.alibaba.com>,
	Hao Peng <flyingpenghao@gmail.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm/khugepaged: cap pageblock contribution to min_free_kbytes
Date: Mon, 27 Jul 2026 11:54:08 +0100	[thread overview]
Message-ID: <amc4ZPJRqiKRaupd@lucifer> (raw)
In-Reply-To: <f6316415-4918-4484-a241-0254efb4aa17@nvidia.com>

On Mon, Jul 20, 2026 at 10:28:21AM +0300, Nimrod Oren wrote:
> On 17/07/2026 17:58, Zi Yan wrote:
> > On 17 Jul 2026, at 9:36, Lorenzo Stoakes (ARM) wrote:
> >> Maybe a simpler version would be to just attack the issue we actually have
> >> with it - it uses too much damn memory :)
> >>
> >> So maybe something like the attached? (you'd probably want to make this a
> >> sysctl or at least a defined value of course)
> >
> > The approach below makes sense to me. In terms of the actual cap size,
> > I asked Codex to check what possible pageblock_size and their reserved
> > sizes:
> >
> > 1. 1MB pageblock size (s390) and 11MB per zone,
> > 2. 2MB pageblock size and 22MB per zone,
> > 3. 8MB pageblock size and 88MB per zone,
> > 4. 16MB pageblock size and 176MB per zone,
> > 5. 32MB pageblock size and 352MB per zone,
> > 6. 128MB pageblock size and 1.375GB per zone,
> > 7. 512MB pageblock size and 5.5GB per zone.
> >
> > 1GB makes sense to me. 512MB might also work.
> >
>
> Assuming three eligible zones, my original proposal would have been
> equivalent to a much lower cap of 66MB:
>
>   2MB * 11 pageblocks per zone * 3 zones = 66MB
>
> Using a more conservative value also sounds reasonable to me.
>
> >> General idea is - if we're going to cap, let's just cap instead of
> >> pretending that page blocks are of a different size.
> >>
> >
> > Sounds good to me. Thank you for the suggestion.
> >
> Thanks Lorenzo and Zi for the review.
> Capping the final recommendation directly sounds good to me.

OK, feel free to respin with that! A Suggested-by is fine for me.

>
>

Cheers, Lorenzo


  reply	other threads:[~2026-07-27 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 17:35 [RFC PATCH] mm/khugepaged: cap pageblock contribution to min_free_kbytes Nimrod Oren
2026-07-17 13:36 ` Lorenzo Stoakes (ARM)
2026-07-17 14:58   ` Zi Yan
2026-07-20  7:28     ` Nimrod Oren
2026-07-27 10:54       ` Lorenzo Stoakes (ARM) [this message]
2026-07-27 10:52     ` Lorenzo Stoakes (ARM)
2026-07-28 18:31       ` Nimrod Oren

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=amc4ZPJRqiKRaupd@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=flyingpenghao@gmail.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liusong@linux.alibaba.com \
    --cc=noren@nvidia.com \
    --cc=npache@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=usama.arif@linux.dev \
    --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).