[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB6083929661A91F9F60F7C8CBFCFD2@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Tue, 11 Feb 2025 18:05:46 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: David Hildenbrand <david@...hat.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>
CC: "Moore, Robert" <robert.moore@...el.com>, "Wysocki, Rafael J"
<rafael.j.wysocki@...el.com>, Len Brown <lenb@...nel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"acpica-devel@...ts.linux.dev" <acpica-devel@...ts.linux.dev>, "Thomas
Gleixner" <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "Borislav
Petkov" <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>, "Oscar
Salvador" <osalvador@...e.de>, Danilo Krummrich <dakr@...nel.org>, "Andrew
Morton" <akpm@...ux-foundation.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/4] ACPI/MRRM: Add "node" symlink to
/sys/devices/system/memory/rangeX
> > What is going to remove this symlink if the memory goes away? Or do
> > these never get removed?
> >
> > symlinks in sysfs created like this always worry me. What is going to
> > use it?
>
> On top of that, we seem to be building a separate hierarchy here.
>
> /sys/devices/system/memory/ operates in memory block granularity.
What defines the memory blocks? I'd initially assumed some connection
to the ACPI SRAT table. But on my test system there are only three
entries in SRAT that define non-zero sized memory blocks (two on
socket/node 0 and one on socket/node 1), yet there are:
memory0 .. memory32 directories
in /sys/devices/system/memory.
The phys_device and phys_index files aren't helping me figure out
what each of them mean.
> /sys/devices/system/node/nodeX/ links to memory blocks that belong to it.
>
> Why is the memory-block granularity insufficient, and why do we have to
> squeeze in another range API here?
If an MRRM range consists of some set of memory blocks (making
sure that no memory block spans across MRRM range boundaries,
then I could add the {local,remote}_region_id files into the memory
block directories.
This could work now while the region assignments are done by the
BIOS. But in the future when OS gets the opportunity to change them
it might be weird if an MRRM range consists of multiple memory
block range, since the region_ids in each all update together.
/sys/devices/system/memory seemed like a logical place for
memory ranges. But should I jump up a level and make a new
/sys/devices/system/memory_regions directory to expose these
ranges?
-Tony
Powered by blists - more mailing lists