All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Tvrtko Ursulin" <tursulin@igalia.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
	"Maíra Canal" <mcanal@igalia.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>
Subject: Re: [PATCH 1/2] numa: Add simple generic NUMA emulation
Date: Thu, 8 Aug 2024 17:27:26 +0100	[thread overview]
Message-ID: <20240808172726.0000154a@Huawei.com> (raw)
In-Reply-To: <54b357b2-2132-4fd6-89db-7a60617dc859@igalia.com>

On Thu, 8 Aug 2024 12:56:44 +0100
Tvrtko Ursulin <tvrtko.ursulin@igalia.com> wrote:

> [Please excuse the re-send, but as I heard nothing concern is it did not 
> get lost in your busy mailbox.]
> 
> Hi Greg,
> 
> Gentle reminder on the opens from this thread. Let me re-summarise the 
> question below:
> 
> On 26/06/2024 12:47, Tvrtko Ursulin wrote:
> > 
> > Hi Greg,
> > 
> > On 26/06/2024 08:38, Greg Kroah-Hartman wrote:  
> >> On Tue, Jun 25, 2024 at 01:58:02PM +0100, Tvrtko Ursulin wrote:  
> >>> From: Maíra Canal <mcanal@igalia.com>
> >>>
> >>> Add some common code for splitting the memory into N emulated NUMA 
> >>> memory
> >>> nodes.
> >>>
> >>> Individual architecture can then enable selecting this option and use 
> >>> the
> >>> existing numa=fake=<N> kernel argument to enable it.
> >>>
> >>> Memory is always split into equally sized chunks.
> >>>
> >>> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> >>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> >>> Co-developed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> >>> Cc: Catalin Marinas <catalin.marinas@arm.com>
> >>> Cc: Will Deacon <will@kernel.org>
> >>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>> Cc: “Rafael J. Wysocki" <rafael@kernel.org>
> >>> ---
> >>>   drivers/base/Kconfig          |  7 ++++
> >>>   drivers/base/Makefile         |  1 +
> >>>   drivers/base/arch_numa.c      |  6 ++++
> >>>   drivers/base/numa_emulation.c | 67 +++++++++++++++++++++++++++++++++++
> >>>   drivers/base/numa_emulation.h | 21 +++++++++++  
> >>
> >> Why not just properly describe the numa topology in your bootloader or
> >> device tree and not need any such "fake" stuff at all?
> >>
> >> Also, you are now asking me to maintain these new files, not something
> >> I'm comfortable doing at all sorry.  
> > 
> > Mostly because ae3c107cd8be ("numa: Move numa implementation to common 
> > code") and existing common code in drivers/base/arch_numa.c it appeared 
> > it could be acceptable to add the simple NUMA emulation into the common 
> > code too. Then building upon the same concept as on x86 where no need 
> > for firmware changes is needed for experimenting with different 
> > configurations.
> > 
> > Would folding into arch_numa.c so no new files are added address your 
> > concern, or your main issue is the emulation in general?  
> 
> Re-iterating and slightly re-formulating this question I see three options:
> 
> a)
> Fold the new simple generic code into the existing arch_numa.c, 
> addressing the "no new files" objection, if that was the main objection.
> 
> b)
> Move completely into arch code - aka you don't want to see it under 
> drivers/base at all, ever, regardless of how simple the new code is, or 
> that common NUMA code is already there.
> 
> c)
> Strong nack for either a) or b) - so "do it in the firmware" comment.
> 
> Trying to understand your position so we can progress this.

See: 
https://lore.kernel.org/all/20240807064110.1003856-20-rppt@kernel.org/
and rest of thread 
https://lore.kernel.org/all/20240807064110.1003856-1-rppt@kernel.org/
[PATCH v4 00/26] mm: introduce numa_memblks

Much larger rework and unification set from Mike Rapoport
that happens to end up adding numa emulation as part of making
the x86 numa_memblk work for arm64 etc.

It's in mm-unstable now so getting some test coverage etc.

Sorry, I'd kind of assumed this also went to linux-mm so
the connection would have been made.

Jonathan


> 
> Thanks,
> 
> Tvrtko
> 
> >   
> >  >> +    if (str_has_prefix(opt, "fake="))
> >  >> +        return numa_emu_cmdline(opt + 5);  
> >  >
> >  > You did not document this at all :(  
> > 
> > That was indeed an oversight. Just need to "copy with edits" some stuff 
> > from Documentation/arch/x86/x86_64/boot-options.rst.
> > 
> > Regards,
> > 
> > Tvrtko  
> 



  reply	other threads:[~2024-08-08 16:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 12:58 [PATCH 0/2] NUMA emulation for arm64 Tvrtko Ursulin
2024-06-25 12:58 ` [PATCH 1/2] numa: Add simple generic NUMA emulation Tvrtko Ursulin
2024-06-26  7:38   ` Greg Kroah-Hartman
2024-06-26 11:47     ` Tvrtko Ursulin
2024-07-03  7:47       ` Tvrtko Ursulin
2024-08-08 11:56       ` Tvrtko Ursulin
2024-08-08 16:27         ` Jonathan Cameron [this message]
2024-08-12 16:35           ` Tvrtko Ursulin
2024-08-22  9:28             ` Mike Rapoport
2024-06-26  7:39   ` Greg Kroah-Hartman
2024-06-25 12:58 ` [PATCH 2/2] arm64/numa: Add NUMA emulation for ARM64 Tvrtko Ursulin

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=20240808172726.0000154a@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-dev@igalia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcanal@igalia.com \
    --cc=rppt@kernel.org \
    --cc=tursulin@igalia.com \
    --cc=tvrtko.ursulin@igalia.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.