Skip to content

Commit 65090f3

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: "191 patches. Subsystems affected by this patch series: kthread, ia64, scripts, ntfs, squashfs, ocfs2, kernel/watchdog, and mm (gup, pagealloc, slab, slub, kmemleak, dax, debug, pagecache, gup, swap, memcg, pagemap, mprotect, bootmem, dma, tracing, vmalloc, kasan, initialization, pagealloc, and memory-failure)" * emailed patches from Andrew Morton <[email protected]>: (191 commits) mm,hwpoison: make get_hwpoison_page() call get_any_page() mm,hwpoison: send SIGBUS with error virutal address mm/page_alloc: split pcp->high across all online CPUs for cpuless nodes mm/page_alloc: allow high-order pages to be stored on the per-cpu lists mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA docs: remove description of DISCONTIGMEM arch, mm: remove stale mentions of DISCONIGMEM mm: remove CONFIG_DISCONTIGMEM m68k: remove support for DISCONTIGMEM arc: remove support for DISCONTIGMEM arc: update comment about HIGHMEM implementation alpha: remove DISCONTIGMEM and NUMA mm/page_alloc: move free_the_page mm/page_alloc: fix counting of managed_pages mm/page_alloc: improve memmap_pages dbg msg mm: drop SECTION_SHIFT in code comments mm/page_alloc: introduce vm.percpu_pagelist_high_fraction mm/page_alloc: limit the number of pages on PCP lists when reclaim is active mm/page_alloc: scale the number of pages that are batch freed ...
2 parents 349a2d5 + 0ed950d commit 65090f3

File tree

259 files changed

+3757
-2804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+3757
-2804
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3591,6 +3591,12 @@
35913591
off: turn off poisoning (default)
35923592
on: turn on poisoning
35933593

3594+
page_reporting.page_reporting_order=
3595+
[KNL] Minimal page reporting order
3596+
Format: <integer>
3597+
Adjust the minimal page reporting order. The page
3598+
reporting is disabled when it exceeds (MAX_ORDER-1).
3599+
35943600
panic= [KNL] Kernel behaviour on panic: delay <timeout>
35953601
timeout > 0: seconds before rebooting
35963602
timeout = 0: wait forever

Documentation/admin-guide/lockup-watchdogs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ in principle, they should work in any architecture where these
3939
subsystems are present.
4040

4141
A periodic hrtimer runs to generate interrupts and kick the watchdog
42-
task. An NMI perf event is generated every "watchdog_thresh"
42+
job. An NMI perf event is generated every "watchdog_thresh"
4343
(compile-time initialized to 10 and configurable through sysctl of the
4444
same name) seconds to check for hardlockups. If any CPU in the system
4545
does not receive any hrtimer interrupt during that time the
4646
'hardlockup detector' (the handler for the NMI perf event) will
4747
generate a kernel warning or call panic, depending on the
4848
configuration.
4949

50-
The watchdog task is a high priority kernel thread that updates a
50+
The watchdog job runs in a stop scheduling thread that updates a
5151
timestamp every time it is scheduled. If that timestamp is not updated
5252
for 2*watchdog_thresh seconds (the softlockup threshold) the
5353
'softlockup detector' (coded inside the hrtimer callback function)

Documentation/admin-guide/sysctl/kernel.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,11 +1297,11 @@ This parameter can be used to control the soft lockup detector.
12971297
= =================================
12981298

12991299
The soft lockup detector monitors CPUs for threads that are hogging the CPUs
1300-
without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads
1301-
from running. The mechanism depends on the CPUs ability to respond to timer
1302-
interrupts which are needed for the 'watchdog/N' threads to be woken up by
1303-
the watchdog timer function, otherwise the NMI watchdog — if enabled — can
1304-
detect a hard lockup condition.
1300+
without rescheduling voluntarily, and thus prevent the 'migration/N' threads
1301+
from running, causing the watchdog work fail to execute. The mechanism depends
1302+
on the CPUs ability to respond to timer interrupts which are needed for the
1303+
watchdog work to be queued by the watchdog timer function, otherwise the NMI
1304+
watchdog — if enabled — can detect a hard lockup condition.
13051305

13061306

13071307
stack_erasing

Documentation/admin-guide/sysctl/vm.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Currently, these files are in /proc/sys/vm:
6464
- overcommit_ratio
6565
- page-cluster
6666
- panic_on_oom
67-
- percpu_pagelist_fraction
67+
- percpu_pagelist_high_fraction
6868
- stat_interval
6969
- stat_refresh
7070
- numa_stat
@@ -790,22 +790,24 @@ panic_on_oom=2+kdump gives you very strong tool to investigate
790790
why oom happens. You can get snapshot.
791791

792792

793-
percpu_pagelist_fraction
794-
========================
793+
percpu_pagelist_high_fraction
794+
=============================
795795

796-
This is the fraction of pages at most (high mark pcp->high) in each zone that
797-
are allocated for each per cpu page list. The min value for this is 8. It
798-
means that we don't allow more than 1/8th of pages in each zone to be
799-
allocated in any single per_cpu_pagelist. This entry only changes the value
800-
of hot per cpu pagelists. User can specify a number like 100 to allocate
801-
1/100th of each zone to each per cpu page list.
796+
This is the fraction of pages in each zone that are can be stored to
797+
per-cpu page lists. It is an upper boundary that is divided depending
798+
on the number of online CPUs. The min value for this is 8 which means
799+
that we do not allow more than 1/8th of pages in each zone to be stored
800+
on per-cpu page lists. This entry only changes the value of hot per-cpu
801+
page lists. A user can specify a number like 100 to allocate 1/100th of
802+
each zone between per-cpu lists.
802803

803-
The batch value of each per cpu pagelist is also updated as a result. It is
804-
set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
804+
The batch value of each per-cpu page list remains the same regardless of
805+
the value of the high fraction so allocation latencies are unaffected.
805806

806-
The initial value is zero. Kernel does not use this value at boot time to set
807-
the high water marks for each per cpu page list. If the user writes '0' to this
808-
sysctl, it will revert to this default behavior.
807+
The initial value is zero. Kernel uses this value to set the high pcp->high
808+
mark based on the low watermark for the zone and the number of local
809+
online CPUs. If the user writes '0' to this sysctl, it will revert to
810+
this default behavior.
809811

810812

811813
stat_interval
@@ -936,12 +938,12 @@ allocations, THP and hugetlbfs pages.
936938

937939
To make it sensible with respect to the watermark_scale_factor
938940
parameter, the unit is in fractions of 10,000. The default value of
939-
15,000 on !DISCONTIGMEM configurations means that up to 150% of the high
940-
watermark will be reclaimed in the event of a pageblock being mixed due
941-
to fragmentation. The level of reclaim is determined by the number of
942-
fragmentation events that occurred in the recent past. If this value is
943-
smaller than a pageblock then a pageblocks worth of pages will be reclaimed
944-
(e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature.
941+
15,000 means that up to 150% of the high watermark will be reclaimed in the
942+
event of a pageblock being mixed due to fragmentation. The level of reclaim
943+
is determined by the number of fragmentation events that occurred in the
944+
recent past. If this value is smaller than a pageblock then a pageblocks
945+
worth of pages will be reclaimed (e.g. 2MB on 64-bit x86). A boost factor
946+
of 0 will disable the feature.
945947

946948

947949
watermark_scale_factor

Documentation/dev-tools/kasan.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,10 @@ When a test fails due to a failed ``kmalloc``::
447447

448448
When a test fails due to a missing KASAN report::
449449

450-
# kmalloc_double_kzfree: EXPECTATION FAILED at lib/test_kasan.c:629
451-
Expected kasan_data->report_expected == kasan_data->report_found, but
452-
kasan_data->report_expected == 1
453-
kasan_data->report_found == 0
454-
not ok 28 - kmalloc_double_kzfree
450+
# kmalloc_double_kzfree: EXPECTATION FAILED at lib/test_kasan.c:974
451+
KASAN failure expected in "kfree_sensitive(ptr)", but none occurred
452+
not ok 44 - kmalloc_double_kzfree
453+
455454

456455
At the end the cumulative status of all KASAN tests is printed. On success::
457456

Documentation/vm/memory-model.rst

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ for the CPU. Then there could be several contiguous ranges at
1414
completely distinct addresses. And, don't forget about NUMA, where
1515
different memory banks are attached to different CPUs.
1616

17-
Linux abstracts this diversity using one of the three memory models:
18-
FLATMEM, DISCONTIGMEM and SPARSEMEM. Each architecture defines what
17+
Linux abstracts this diversity using one of the two memory models:
18+
FLATMEM and SPARSEMEM. Each architecture defines what
1919
memory models it supports, what the default memory model is and
2020
whether it is possible to manually override that default.
2121

22-
.. note::
23-
At time of this writing, DISCONTIGMEM is considered deprecated,
24-
although it is still in use by several architectures.
25-
2622
All the memory models track the status of physical page frames using
2723
struct page arranged in one or more arrays.
2824

@@ -63,43 +59,6 @@ straightforward: `PFN - ARCH_PFN_OFFSET` is an index to the
6359
The `ARCH_PFN_OFFSET` defines the first page frame number for
6460
systems with physical memory starting at address different from 0.
6561

66-
DISCONTIGMEM
67-
============
68-
69-
The DISCONTIGMEM model treats the physical memory as a collection of
70-
`nodes` similarly to how Linux NUMA support does. For each node Linux
71-
constructs an independent memory management subsystem represented by
72-
`struct pglist_data` (or `pg_data_t` for short). Among other
73-
things, `pg_data_t` holds the `node_mem_map` array that maps
74-
physical pages belonging to that node. The `node_start_pfn` field of
75-
`pg_data_t` is the number of the first page frame belonging to that
76-
node.
77-
78-
The architecture setup code should call :c:func:`free_area_init_node` for
79-
each node in the system to initialize the `pg_data_t` object and its
80-
`node_mem_map`.
81-
82-
Every `node_mem_map` behaves exactly as FLATMEM's `mem_map` -
83-
every physical page frame in a node has a `struct page` entry in the
84-
`node_mem_map` array. When DISCONTIGMEM is enabled, a portion of the
85-
`flags` field of the `struct page` encodes the node number of the
86-
node hosting that page.
87-
88-
The conversion between a PFN and the `struct page` in the
89-
DISCONTIGMEM model became slightly more complex as it has to determine
90-
which node hosts the physical page and which `pg_data_t` object
91-
holds the `struct page`.
92-
93-
Architectures that support DISCONTIGMEM provide :c:func:`pfn_to_nid`
94-
to convert PFN to the node number. The opposite conversion helper
95-
:c:func:`page_to_nid` is generic as it uses the node number encoded in
96-
page->flags.
97-
98-
Once the node number is known, the PFN can be used to index
99-
appropriate `node_mem_map` array to access the `struct page` and
100-
the offset of the `struct page` from the `node_mem_map` plus
101-
`node_start_pfn` is the PFN of that page.
102-
10362
SPARSEMEM
10463
=========
10564

arch/alpha/Kconfig

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -549,29 +549,12 @@ config NR_CPUS
549549
MARVEL support can handle a maximum of 32 CPUs, all the others
550550
with working support have a maximum of 4 CPUs.
551551

552-
config ARCH_DISCONTIGMEM_ENABLE
553-
bool "Discontiguous Memory Support"
554-
depends on BROKEN
555-
help
556-
Say Y to support efficient handling of discontiguous physical memory,
557-
for architectures which are either NUMA (Non-Uniform Memory Access)
558-
or have huge holes in the physical address space for other reasons.
559-
See <file:Documentation/vm/numa.rst> for more.
560-
561552
config ARCH_SPARSEMEM_ENABLE
562553
bool "Sparse Memory Support"
563554
help
564555
Say Y to support efficient handling of discontiguous physical memory,
565556
for systems that have huge holes in the physical address space.
566557

567-
config NUMA
568-
bool "NUMA Support (EXPERIMENTAL)"
569-
depends on DISCONTIGMEM && BROKEN
570-
help
571-
Say Y to compile the kernel to support NUMA (Non-Uniform Memory
572-
Access). This option is for configuring high-end multiprocessor
573-
server machines. If in doubt, say N.
574-
575558
config ALPHA_WTINT
576559
bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC
577560
default y if ALPHA_QEMU
@@ -596,11 +579,6 @@ config ALPHA_WTINT
596579

597580
If unsure, say N.
598581

599-
config NODES_SHIFT
600-
int
601-
default "7"
602-
depends on NEED_MULTIPLE_NODES
603-
604582
# LARGE_VMALLOC is racy, if you *really* need it then fix it first
605583
config ALPHA_LARGE_VMALLOC
606584
bool

arch/alpha/include/asm/machvec.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ struct alpha_machine_vector
9999

100100
const char *vector_name;
101101

102-
/* NUMA information */
103-
int (*pa_to_nid)(unsigned long);
104-
int (*cpuid_to_nid)(int);
105-
unsigned long (*node_mem_start)(int);
106-
unsigned long (*node_mem_size)(int);
107-
108102
/* System specific parameters. */
109103
union {
110104
struct {

arch/alpha/include/asm/mmzone.h

Lines changed: 0 additions & 100 deletions
This file was deleted.

arch/alpha/include/asm/pgtable.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ extern unsigned long __zero_page(void);
206206
#define page_to_pa(page) (page_to_pfn(page) << PAGE_SHIFT)
207207
#define pte_pfn(pte) (pte_val(pte) >> 32)
208208

209-
#ifndef CONFIG_DISCONTIGMEM
210209
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
211210
#define mk_pte(page, pgprot) \
212211
({ \
@@ -215,7 +214,6 @@ extern unsigned long __zero_page(void);
215214
pte_val(pte) = (page_to_pfn(page) << 32) | pgprot_val(pgprot); \
216215
pte; \
217216
})
218-
#endif
219217

220218
extern inline pte_t pfn_pte(unsigned long physpfn, pgprot_t pgprot)
221219
{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpfn) << 32) | pgprot_val(pgprot); return pte; }
@@ -330,9 +328,7 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
330328
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
331329
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
332330

333-
#ifndef CONFIG_DISCONTIGMEM
334331
#define kern_addr_valid(addr) (1)
335-
#endif
336332

337333
#define pte_ERROR(e) \
338334
printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))

0 commit comments

Comments
 (0)