[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxZntygJWqxq0zGt@PC2K9PVX.TheFacebook.com>
Date: Mon, 21 Oct 2024 10:39:51 -0400
From: Gregory Price <gourry@...rry.net>
To: Mike Rapoport <rppt@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, linux-mm@...ck.org,
dan.j.williams@...el.com, ira.weiny@...el.com, david@...hat.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
rafael@...nel.org, lenb@...nel.org, akpm@...ux-foundation.org,
alison.schofield@...el.com, Jonathan.Cameron@...wei.com,
rrichter@....com, ytcoode@...il.com, haibo1.xu@...el.com,
dave.jiang@...el.com
Subject: Re: [PATCH v2 1/3] mm/memblock: implement memblock_advise_size_order
and probe functions
On Sun, Oct 20, 2024 at 11:57:27AM +0300, Mike Rapoport wrote:
> On Wed, Oct 16, 2024 at 03:24:43PM -0400, Gregory Price wrote:
> > Hotplug memory sources may have opinions on what the memblock size
> > should be - usually for alignment purposes. For example, CXL memory
> > extents can be as small as 256MB with a matching physical alignment.
> >
> > Implement memblock_advise_size_order for use during early init, prior
> > to allocator and smp init, for software to advise the system as to what
> > the preferred block size should be.
> >
> > The probe function is meant for arch_init code to fetch this value
> > once during memblock size calculation. Use of the advisement value
> > is arch-specific, and no guarantee is made that it will be used.
>
> I'm confused.
>
> Aren't we talking about memory blocks for hotplugable memory here?
> This functionality rather belongs to drivers/base/memory.c, doesn't it?
>
You're right, I should have put it there - i got distracted by the ifdef
mess around get_block_size_bytes/set...order and just tossed it into memblock
to avoid it. I should be able to ifdef the definition in the header and move
it into memory.c
> > Calls to either function after probe results in -EBUSY to signal that
> > advisement is ignored or that memblock_get_size_bytes should be used.
> >
> > Suggested-by: Ira Weiny <ira.weiny@...el.com>
> > Signed-off-by: Gregory Price <gourry@...rry.net>
> > ---
> > include/linux/memblock.h | 2 ++
> > mm/memblock.c | 49 ++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 51 insertions(+)
> >
Powered by blists - more mailing lists