From: Catalin Marinas <catalin.marinas@arm.com>
To: Vanshidhar Konda <vanshikonda@os.amperecomputing.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
linux-kernel@vger.kernel.org, patches@amperecomputing.com,
linux-arm-kernel@lists.infradead.org,
Anshuman Khandual <anshuman.khandual@arm.com>,
Will Deacon <will@kernel.org>
Subject: Re: [PATCH] arm64: NUMA: Kconfig: Increase max number of nodes
Date: Fri, 30 Oct 2020 10:21:08 +0000 [thread overview]
Message-ID: <20201030102107.GA23196@gaia> (raw)
In-Reply-To: <20201029194850.jon6lxlbhquy7zql@con01sys-r111.scc-lab.amperecomputing.com>
On Thu, Oct 29, 2020 at 12:48:50PM -0700, Vanshidhar Konda wrote:
> On Thu, Oct 29, 2020 at 01:37:10PM +0000, Catalin Marinas wrote:
> > On Wed, Oct 21, 2020 at 11:29:41PM +0100, Valentin Schneider wrote:
> > > On 21/10/20 12:02, Jonathan Cameron wrote:
> > > > On Wed, 21 Oct 2020 09:43:21 +0530
> > > > Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> > > >> Agreed. Do we really need to match X86 right now ? Do we really have
> > > >> systems that has 64 nodes ? We should not increase the default node
> > > >> value and then try to solve some new problems, when there might not
> > > >> be any system which could even use that. I would suggest increase
> > > >> NODES_SHIFT value upto as required by a real and available system.
> > > >
> > > > I'm not going to give precise numbers on near future systems but it is public
> > > > that we ship 8 NUMA node ARM64 systems today. Things will get more
> > > > interesting as CXL and CCIX enter the market on ARM systems,
> > > > given chances are every CXL device will look like another NUMA
> > > > node (CXL spec says they should be presented as such) and you
> > > > may be able to rack up lots of them.
> > > >
> > > > So I'd argue minimum that makes sense today is 16 nodes, but looking forward
> > > > even a little and 64 is not a great stretch.
> > > > I'd make the jump to 64 so we can forget about this again for a year or two.
> > > > People will want to run today's distros on these new machines and we'd
> > > > rather not have to go around all the distros asking them to carry a patch
> > > > increasing this count (I assume they are already carrying such a patch
> > > > due to those 8 node systems)
> > >
> > > I agree that 4 nodes is somewhat anemic; I've had to bump that just to
> > > run some scheduler tests under QEMU. However I still believe we should
> > > exercise caution before cranking it too high, especially when seeing things
> > > like:
> > >
> > > ee38d94a0ad8 ("page flags: prioritize kasan bits over last-cpuid")
> > >
> > > To give some numbers, a defconfig build gives me:
> > >
> > > SECTIONS_WIDTH=0 ZONES_WIDTH=2 NODES_SHIFT=2 LAST_CPUPID_SHIFT=(8+8) KASAN_TAG_WIDTH=0
> > > BITS_PER_LONG=64 NR_PAGEFLAGS=24
> > >
> > > IOW, we need 18 + NODES_SHIFT <= 40 -> NODES_SHIFT <= 22. That looks to be
> > > plenty, however this can get cramped fairly easily with any combination of:
> > >
> > > CONFIG_SPARSEMEM_VMEMMAP=n (-18)
> > > CONFIG_IDLE_PAGE_TRACKING=y (-2)
> > > CONFIG_KASAN=y + CONFIG_KASAN_SW_TAGS (-8)
> > >
> > > Taking Arnd's above example, a randconfig build picking !VMEMMAP already
> > > limits the NODES_SHIFT to 4 *if* we want to keep the CPUPID thing within
> > > the flags (it gets a dedicated field at the tail of struct page
> > > otherwise). If that is something we don't care too much about, then
> > > consider my concerns taken care of.
> >
> > I don't think there's any value in allowing SPARSEMEM_VMEMMAP to be
> > disabled but the option is in the core mm/Kconfig file. We could make
> > NODES_SHIFT depend on SPARSEMEM_VMEMMAP (there's DISCONTIGMEM as well
> > but hopefully that's going away soon).
> >
> > > One more thing though: NR_CPUS can be cranked up to 4096 but we've only set
> > > it to 256 IIRC to support the TX2. From that PoV, I'm agreeing with
> > > Anshuman in that we should set it to match the max encountered on platforms
> > > that are in use right now.
> >
> > I agree. Let's bump NODES_SHIFT to 4 now to cover existing platforms. If
> > distros have a 10-year view, they can always ship a kernel configured to
> > 64 nodes, no need to change Kconfig (distros never ship with defconfig).
> >
> > It may have an impact on more memory constrained platforms but that's
> > not what defconfig is about. It should allow existing hardware to run
> > Linux but not necessarily run it in the most efficient way possible.
> >
>
> From the discussion it looks like 4 is an acceptable number to support
> current hardware. I'll send a patch with NODES_SHIFT set to 4. Is it still
> possible to add this change to the 5.10 kernel?
I think we can but I'll leave the decision to Will (and don't forget to
cc the arm64 maintainers on your next post).
--
Catalin
next prev parent reply other threads:[~2020-10-30 10:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 17:34 [PATCH] arm64: NUMA: Kconfig: Increase max number of nodes Vanshidhar Konda
2020-10-20 18:09 ` Valentin Schneider
2020-10-21 4:13 ` Anshuman Khandual
2020-10-21 11:02 ` Jonathan Cameron
2020-10-21 22:29 ` Valentin Schneider
2020-10-29 13:37 ` Catalin Marinas
2020-10-29 19:48 ` Vanshidhar Konda
2020-10-30 10:21 ` Catalin Marinas [this message]
2020-10-21 23:44 ` Robin Murphy
2020-10-22 1:07 ` Vanshi Konda
2020-10-22 11:21 ` Robin Murphy
2020-10-22 16:25 ` Vanshi Konda
2020-10-27 22:46 ` Dave Kleikamp
2020-10-27 23:14 ` Vanshidhar Konda
2020-10-27 23:13 ` Vanshidhar Konda
2020-10-21 16:02 ` Vanshi Konda
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=20201030102107.GA23196@gaia \
--to=catalin.marinas@arm.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=anshuman.khandual@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@amperecomputing.com \
--cc=valentin.schneider@arm.com \
--cc=vanshikonda@os.amperecomputing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox