linux_dsm_epyc7002/arch
Michal Hocko fcdaf842bd mm, sparse: do not swamp log with huge vmemmap allocation failures
While doing memory hotplug tests under heavy memory pressure we have
noticed too many page allocation failures when allocating vmemmap memmap
backed by huge page

  kworker/u3072:1: page allocation failure: order:9, mode:0x24084c0(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO)
  [...]
  Call Trace:
    dump_trace+0x59/0x310
    show_stack_log_lvl+0xea/0x170
    show_stack+0x21/0x40
    dump_stack+0x5c/0x7c
    warn_alloc_failed+0xe2/0x150
    __alloc_pages_nodemask+0x3ed/0xb20
    alloc_pages_current+0x7f/0x100
    vmemmap_alloc_block+0x79/0xb6
    __vmemmap_alloc_block_buf+0x136/0x145
    vmemmap_populate+0xd2/0x2b9
    sparse_mem_map_populate+0x23/0x30
    sparse_add_one_section+0x68/0x18e
    __add_pages+0x10a/0x1d0
    arch_add_memory+0x4a/0xc0
    add_memory_resource+0x89/0x160
    add_memory+0x6d/0xd0
    acpi_memory_device_add+0x181/0x251
    acpi_bus_attach+0xfd/0x19b
    acpi_bus_scan+0x59/0x69
    acpi_device_hotplug+0xd2/0x41f
    acpi_hotplug_work_fn+0x1a/0x23
    process_one_work+0x14e/0x410
    worker_thread+0x116/0x490
    kthread+0xbd/0xe0
    ret_from_fork+0x3f/0x70

and we do see many of those because essentially every allocation fails
for each memory section.  This is an excessive way to tell the user that
there is nothing to really worry about because we do have a fallback
mechanism to use base pages.  The only downside might be a performance
degradation due to TLB pressure.

This patch changes vmemmap_alloc_block() to use __GFP_NOWARN and warn
explicitly once on the first allocation failure.  This will reduce the
noise in the kernel log considerably, while we still have an indication
that a performance might be impacted.

[mhocko@kernel.org: forgot to git add the follow up fix]
  Link: http://lkml.kernel.org/r/20171107090635.c27thtse2lchjgvb@dhcp22.suse.cz
Link: http://lkml.kernel.org/r/20171106092228.31098-1-mhocko@kernel.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Joe Perches <joe@perches.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-15 18:21:07 -08:00
..
alpha Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
arc Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
arm kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
arm64 arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow 2017-11-15 18:21:05 -08:00
blackfin Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-11-14 17:52:21 -08:00
c6x DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
cris DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
frv mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
h8300 mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
hexagon A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
ia64 A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
m32r m32r: fix endianness constraints 2017-11-15 18:21:00 -08:00
m68k A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
metag DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
microblaze DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
mips mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
mn10300 mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
nios2 DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
openrisc kmemcheck: remove annotations 2017-11-15 18:21:04 -08:00
parisc A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
powerpc mm: remove cold parameter from free_hot_cold_page* 2017-11-15 18:21:06 -08:00
riscv RISC-V Port for Linux 4.15 v9 2017-11-15 10:49:15 -08:00
s390 mm: account pud page tables 2017-11-15 18:21:04 -08:00
score License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sh kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
sparc mm: remove cold parameter from free_hot_cold_page* 2017-11-15 18:21:06 -08:00
tile mm: remove cold parameter from free_hot_cold_page* 2017-11-15 18:21:06 -08:00
um mm, arch: remove empty_bad_page* 2017-11-15 18:21:03 -08:00
unicore32 kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
x86 mm, sparse: do not swamp log with huge vmemmap allocation failures 2017-11-15 18:21:07 -08:00
xtensa Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
.gitignore
Kconfig Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00