linux-stable/arch
Mike Rapoport fcd353a314 m68k: deprecate DISCONTIGMEM
DISCONTIGMEM was intended to provide more efficient support for systems
with holes in their physical address space that FLATMEM did.

Yet, it's overhead in terms of the memory consumption seems to
overweight the savings on the unused memory map.

For a ARAnyM system with 16 MBytes of FastRAM configured, the memory
usage reported after page allocator initialization is

  Memory: 23828K/30720K available (3206K kernel code, 535K rwdata, 936K rodata, 768K init, 193K bss, 6892K reserved, 0K cma-reserved)

and with DISCONTIGMEM disabled and with relatively large hole in the memory
map it is:

  Memory: 23864K/30720K available (3197K kernel code, 516K rwdata, 936K rodata, 764K init, 179K bss, 6856K reserved, 0K cma-reserved)

Moreover, since m68k already has custom pfn_valid() it is possible to
define HAVE_ARCH_PFN_VALID to enable freeing of unused memory map.  The
minimal size of a hole that can be freed should not be less than
MAX_ORDER_NR_PAGES so to achieve more substantial memory savings let
m68k also define custom FORCE_MAX_ZONEORDER.

With FORCE_MAX_ZONEORDER set to 9 memory usage becomes:

  Memory: 23880K/30720K available (3197K kernel code, 516K rwdata, 936K rodata, 764K init, 179K bss, 6840K reserved, 0K cma-reserved)

Link: https://lkml.kernel.org/r/20201101170454.9567-14-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Meelis Roos <mroos@linux.ee>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-12-15 12:13:43 -08:00
..
alpha alpha: switch from DISCONTIGMEM to SPARSEMEM 2020-12-15 12:13:42 -08:00
arc arc: use FLATMEM with freeing of unused memory map instead of DISCONTIGMEM 2020-12-15 12:13:42 -08:00
arm arm, arm64: move free_unused_memmap() to generic mm 2020-12-15 12:13:42 -08:00
arm64 arm, arm64: move free_unused_memmap() to generic mm 2020-12-15 12:13:42 -08:00
c6x
csky Yet two more places which invoke tracing from RCU disabled regions in the 2020-11-29 11:19:26 -08:00
h8300 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
hexagon sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
ia64 ia64: make SPARSEMEM default and disable DISCONTIGMEM 2020-12-15 12:13:42 -08:00
m68k m68k: deprecate DISCONTIGMEM 2020-12-15 12:13:43 -08:00
microblaze sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
mips mm: forbid splitting special mappings 2020-12-15 12:13:41 -08:00
nds32 mm: memcontrol: account pagetables per node 2020-12-15 12:13:40 -08:00
nios2 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
powerpc powerpc fixes for 5.10 #6 2020-12-10 16:36:30 -08:00
riscv RISC-V Fixes for 5.10 (unless there's an rc8) 2020-12-12 09:50:26 -08:00
s390 mm: forbid splitting special mappings 2020-12-15 12:13:41 -08:00
sh sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
sparc sparc: fix handling of page table constructor failure 2020-12-15 12:13:41 -08:00
um Yet two more places which invoke tracing from RCU disabled regions in the 2020-11-29 11:19:26 -08:00
x86 mm: forbid splitting special mappings 2020-12-15 12:13:41 -08:00
xtensa xtensa: uaccess: Add missing __user to strncpy_from_user() prototype 2020-11-17 05:09:28 -08:00
.gitignore
Kconfig arm, arm64: move free_unused_memmap() to generic mm 2020-12-15 12:13:42 -08:00