The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v3 00/10] sh: remove NUMA and SPARSEMEM support
@ 2026-07-02  9:37 Mike Rapoport (Microsoft)
  2026-07-02  9:37 ` [PATCH v3 01/10] sh: remove CONFIG_NUMA and realted configuration options Mike Rapoport (Microsoft)
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Mike Rapoport (Microsoft) @ 2026-07-02  9:37 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, John Paul Adrian Glaubitz, Mike Rapoport,
	Rich Felker, Yoshinori Sato, linux-sh, linux-kernel, linux-mm

Hi,

NUMA support for SuperH was introduced a long time ago by commit
b241cb0c885e ("sh: Support for multiple nodes.")

        "... for boards with many different memory blocks that are
         otherwise unused (SH7722/SH7785 URAM and so forth)"

In reality, this added 128K of memory on sh7722 and sh7785 and 256K on
shx3 at the expense of all the NUMA related code in the kernel.

For build of v7.0-rc7 with defconfig and the same configuration with
CONFIG_NUMA disabled, bloat-o-meter reports difference of ~76k. Disabling
CONFIG_SPARSMEM on top increases the difference to ~94k. And that's only
overhead in code and static data that does not take into the account data
structures allocated at run time.

And all this overhead has been there for nothing for almost 8 years
because since commit ac21fc2dcb40 ("sh: switch to NO_BOOTMEM")
those additional "nodes" could not be used by the core MM because the
maximal pfn for ZONE_NORMAL was cut out at the end of the normal memory.

---
It's been another few weeks without updates from Adrian and I don't see
why it should wait more.

@Andrew, please take it to the mm tree.

v3 changes:
* rebased on v7.2-rc1

v2: https://patch.msgid.link/20260510135546.13554-1-rppt@kernel.org
* remove stale SYS_SUPPORTS_NUMA
* add Arnd's Reviewed-by

v1: https://patch.msgid.link/20260510135546.13554-1-rppt@kernel.org

---
Mike Rapoport (Microsoft) (10):
      sh: remove CONFIG_NUMA and realted configuration options
      sh: mm: remove numa.c
      sh: mm: drop allocate_pgdat()
      sh: remove setup_bootmem_node() and plat_mem_setup()
      sh: drop dead code guarded by #ifdef CONFIG_NUMA
      sh: drop include/asm/mmzone.h
      init/Kconfig: drop ARCH_WANT_NUMA_VARIABLE_LOCALITY
      sh: init: remove call the memblock_set_node()
      sh: remove SPARSEMEM related entries from Kconfig
      sh: drop include/asm/sparsemem.h

 arch/sh/Kconfig                        | 12 --------
 arch/sh/configs/migor_defconfig        |  1 -
 arch/sh/configs/sdk7786_defconfig      |  1 -
 arch/sh/configs/se7722_defconfig       |  1 -
 arch/sh/configs/shx3_defconfig         |  1 -
 arch/sh/configs/ul2_defconfig          |  1 -
 arch/sh/include/asm/mmu.h              |  2 ++
 arch/sh/include/asm/mmzone.h           | 42 ---------------------------
 arch/sh/include/asm/setup.h            |  3 ++
 arch/sh/include/asm/sparsemem.h        | 12 --------
 arch/sh/include/asm/topology.h         | 13 ---------
 arch/sh/kernel/cpu/sh4a/setup-sh7366.c |  5 ----
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |  7 -----
 arch/sh/kernel/cpu/sh4a/setup-sh7723.c |  1 -
 arch/sh/kernel/cpu/sh4a/setup-sh7724.c |  1 -
 arch/sh/kernel/cpu/sh4a/setup-sh7757.c |  5 ----
 arch/sh/kernel/cpu/sh4a/setup-sh7785.c |  7 -----
 arch/sh/kernel/cpu/sh4a/setup-sh7786.c |  5 ----
 arch/sh/kernel/cpu/sh4a/setup-shx3.c   | 18 ------------
 arch/sh/kernel/setup.c                 |  7 -----
 arch/sh/kernel/topology.c              | 12 --------
 arch/sh/kernel/vmcore_info.c           |  4 ---
 arch/sh/mm/Kconfig                     | 29 -------------------
 arch/sh/mm/Makefile                    |  1 -
 arch/sh/mm/init.c                      | 24 ---------------
 arch/sh/mm/numa.c                      | 53 ----------------------------------
 arch/sh/mm/sram.c                      |  3 +-
 init/Kconfig                           |  7 -----
 28 files changed, 6 insertions(+), 272 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260702-sh-numa-v2-91b86e3901b4

--
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-07-03  6:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  9:37 [PATCH v3 00/10] sh: remove NUMA and SPARSEMEM support Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 01/10] sh: remove CONFIG_NUMA and realted configuration options Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 02/10] sh: mm: remove numa.c Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 03/10] sh: mm: drop allocate_pgdat() Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 04/10] sh: remove setup_bootmem_node() and plat_mem_setup() Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 05/10] sh: drop dead code guarded by #ifdef CONFIG_NUMA Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 06/10] sh: drop include/asm/mmzone.h Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 07/10] init/Kconfig: drop ARCH_WANT_NUMA_VARIABLE_LOCALITY Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 08/10] sh: init: remove call the memblock_set_node() Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 09/10] sh: remove SPARSEMEM related entries from Kconfig Mike Rapoport (Microsoft)
2026-07-02  9:37 ` [PATCH v3 10/10] sh: drop include/asm/sparsemem.h Mike Rapoport (Microsoft)
2026-07-02  9:54 ` [PATCH v3 00/10] sh: remove NUMA and SPARSEMEM support John Paul Adrian Glaubitz
2026-07-02 10:20   ` Mike Rapoport
2026-07-02 10:25     ` John Paul Adrian Glaubitz
2026-07-03  6:16       ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox