linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Meyer <kyle.meyer@hpe.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	Jiaqi Yan <jiaqiyan@google.com>,
	David Hildenbrand <david@redhat.com>,
	akpm@linux-foundation.org, corbet@lwn.net, linmiaohe@huawei.com,
	shuah@kernel.org, jane.chu@oracle.com, Liam.Howlett@oracle.com,
	bp@alien8.de, hannes@cmpxchg.org, jack@suse.cz,
	joel.granados@kernel.org, laoar.shao@gmail.com,
	lorenzo.stoakes@oracle.com, mclapinski@google.com,
	mhocko@suse.com, nao.horiguchi@gmail.com, osalvador@suse.de,
	rafael.j.wysocki@intel.com, rppt@kernel.org,
	russ.anderson@hpe.com, shawn.fan@intel.com, surenb@google.com,
	vbabka@suse.cz, linux-acpi@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm/memory-failure: Support disabling soft offline for HugeTLB pages
Date: Tue, 23 Sep 2025 01:03:46 -0500	[thread overview]
Message-ID: <aNI4QgvyoSrP9-K4@hpe.com> (raw)
In-Reply-To: <4d2e8686-8810-4901-8483-9b5eb040d489@arm.com>

On Sun, Sep 21, 2025 at 05:06:31PM +0530, Anshuman Khandual wrote:
> 
> 
> On 18/09/25 1:24 AM, Luck, Tony wrote:
> > On Wed, Sep 17, 2025 at 12:32:47PM -0700, Jiaqi Yan wrote:
> >> +1. Given /proc/sys/vm/enable_soft_offline is extensible, I would
> >> prefer a compact userspace API.
> >>
> >>> would create a new file, and the file has weird semantics such that it
> >>> has no meaning when enable_soft_offline=0.
> > 
> > So the expand the bitmask idea from earlier in this thread?
> > 
> > Bit0	0 = soft offline disabled. 1 = Enabled (but see other bits)
> > Bit1	0 = allow offline of 4K pages, 1 = suppress 4K offline
> > Bit2	0 = allow offline of hugetlb, 1 = suppress hugetlb offline
> > Bit3	0 = allow breakup of transparent huge pages to just offline 4K, 1 = suppress transparent breakup
> > Bit4+	Reserved for suppressing other page types we invent in the future
> > 
> > Values 0 and 1 keep their original meaning.
> > 
> > Value 5 means: offline 4K, keep hugetlb, breakup transparent huge pages.
> 
> This disable bitmask (but when generally enabled via bit[0] = 1) method
> seems much better. But I am not sure about page size being a valid page
> type classification though. Just to start with, defining first two bits
> in this bitmask should be good enough, which will atleast help document
> and validate this new interface properly.
> 
> Bit1	0 = allow offline of hugetlb, 1 = suppress hugetlb offline
> Bit2	0 = allow breakup of transparent huge pages to just offline base pages, 1 = suppress transparent breakup
> Bit3+	Reserved for suppressing other page types we invent in the future

The current patch is already applied to mm-git and supports the following bits:

    0 - Enable soft offline
    1 - Disable soft offline for HugeTLB pages

https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-new&id=9ae6eefa4b6bd3c3e7ef417a6507dce4b55101b4

Are any immediate changes needed?

Support for additional page types, such as transparent huge pages, can be added
later as needed.

Thanks,
Kyle Meyer

  reply	other threads:[~2025-09-23  6:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  0:27 [PATCH v2] mm/memory-failure: Support disabling soft offline for HugeTLB pages Kyle Meyer
2025-09-16  3:16 ` Andrew Morton
2025-09-16  7:14   ` Kyle Meyer
2025-09-16 15:20     ` Luck, Tony
2025-09-16 17:59       ` Kyle Meyer
2025-09-16 18:08         ` Luck, Tony
2025-09-17  6:35           ` Fan, Shawn
2025-09-17 18:59             ` Kyle Meyer
2025-09-18  8:34               ` Shuai Xue
2025-09-18 15:48                 ` Jiaqi Yan
2025-09-16 10:12 ` Anshuman Khandual
2025-09-17  7:02   ` David Hildenbrand
2025-09-17 18:51     ` Kyle Meyer
2025-09-17 19:05       ` David Hildenbrand
2025-09-17 19:32         ` Jiaqi Yan
2025-09-17 19:54           ` Luck, Tony
2025-09-17 21:39             ` Kyle Meyer
2025-09-17 22:15               ` Jiaqi Yan
2025-09-21 11:36             ` Anshuman Khandual
2025-09-23  6:03               ` Kyle Meyer [this message]
2025-09-21 11:25         ` Anshuman Khandual

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=aNI4QgvyoSrP9-K4@hpe.com \
    --to=kyle.meyer@hpe.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=jane.chu@oracle.com \
    --cc=jiaqiyan@google.com \
    --cc=joel.granados@kernel.org \
    --cc=laoar.shao@gmail.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mclapinski@google.com \
    --cc=mhocko@suse.com \
    --cc=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rppt@kernel.org \
    --cc=russ.anderson@hpe.com \
    --cc=shawn.fan@intel.com \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=tony.luck@intel.com \
    --cc=vbabka@suse.cz \
    /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).