Bug 231460 - want a way to disable NUMA support at boot time
Summary: want a way to disable NUMA support at boot time
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 17:33 UTC by Mark Johnston
Modified: 2018-11-01 16:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnston freebsd_committer freebsd_triage 2018-09-18 17:33:08 UTC
For debugging, or as a workaround against software issues, it would be useful to have a tuneable that tells the kernel to treat all physical memory as belonging to the same NUMA domain.
Comment 1 Rodney W. Grimes freebsd_committer freebsd_triage 2018-09-18 17:38:30 UTC
If this makes it the same as if NUMA was not compiled into the kernel I would be good with that, but some how I think that other code paths would still be running that would be different than an none NUMA kernel.

Ideally what is wanted is a knob that makes it as if NUMA was not even
compile into the kernel.
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2018-09-18 17:41:27 UTC
(In reply to Rodney W. Grimes from comment #1)
I don't think that's really feasible, for the same reason that setting kern.smp.disabled=1 isn't the same as removing "options SMP" from the kernel configuration.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2018-10-05 19:35:15 UTC
https://reviews.freebsd.org/D17439
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-10-22 20:14:08 UTC
A commit references this bug:

Author: markj
Date: Mon Oct 22 20:13:53 UTC 2018
New revision: 339616
URL: https://svnweb.freebsd.org/changeset/base/339616

Log:
  Make it possible to disable NUMA support with a tunable.

  This provides a chicken switch for anyone negatively impacted by
  enabling NUMA in the amd64 GENERIC kernel configuration.  With
  NUMA disabled at boot-time, information about the NUMA topology
  is not exposed to the rest of the kernel, and all of physical
  memory is viewed as coming from a single domain.

  This method still has some performance overhead relative to disabling
  NUMA support at compile time.

  PR:		231460
  Reviewed by:	alc, gallatin, kib
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D17439

Changes:
  head/share/man/man4/numa.4
  head/sys/arm64/arm64/mp_machdep.c
  head/sys/kern/kern_cpuset.c
  head/sys/vm/vm_phys.c
  head/sys/x86/acpica/srat.c
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2018-10-22 20:15:16 UTC
Re-open, I still have to merge to stable/12.
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-11-01 16:50:44 UTC
A commit references this bug:

Author: markj
Date: Thu Nov  1 16:50:20 UTC 2018
New revision: 340007
URL: https://svnweb.freebsd.org/changeset/base/340007

Log:
  MFC r339616:
  Make it possible to disable NUMA support with a tunable.

  PR:		231460
  Approved by:	re (gjb)

Changes:
_U  stable/12/
  stable/12/share/man/man4/numa.4
  stable/12/sys/arm64/arm64/mp_machdep.c
  stable/12/sys/kern/kern_cpuset.c
  stable/12/sys/vm/vm_phys.c
  stable/12/sys/x86/acpica/srat.c