Skip to content

Commit 81e1133

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - a few MM hotfixes - kthread, tools, scripts, ntfs and ocfs2 - some of MM Subsystems affected by this patch series: kthread, tools, scripts, ntfs, ocfs2 and mm (hofixes, pagealloc, slab-generic, slab, slub, kcsan, debug, pagecache, gup, swap, shmem, memcg, pagemap, mremap, mincore, sparsemem, vmalloc, kasan, pagealloc, hugetlb and vmscan). * emailed patches from Andrew Morton <[email protected]>: (162 commits) mm: vmscan: consistent update to pgrefill mm/vmscan.c: fix typo khugepaged: khugepaged_test_exit() check mmget_still_valid() khugepaged: retract_page_tables() remember to test exit khugepaged: collapse_pte_mapped_thp() protect the pmd lock khugepaged: collapse_pte_mapped_thp() flush the right range mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible mm: thp: replace HTTP links with HTTPS ones mm/page_alloc: fix memalloc_nocma_{save/restore} APIs mm/page_alloc.c: skip setting nodemask when we are in interrupt mm/page_alloc: fallbacks at most has 3 elements mm/page_alloc: silence a KASAN false positive mm/page_alloc.c: remove unnecessary end_bitidx for [set|get]_pfnblock_flags_mask() mm/page_alloc.c: simplify pageblock bitmap access mm/page_alloc.c: extract the common part in pfn_to_bitidx() mm/page_alloc.c: replace the definition of NR_MIGRATETYPE_BITS with PB_migratetype_bits mm/shuffle: remove dynamic reconfiguration mm/memory_hotplug: document why shuffle_zone() is relevant mm/page_alloc: remove nr_free_pagecache_pages() mm: remove vm_total_pages ...
2 parents 5631c5e + 912c057 commit 81e1133

File tree

396 files changed

+4868
-3399
lines changed

Some content is hidden

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

396 files changed

+4868
-3399
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4693,7 +4693,7 @@
46934693
fragmentation. Defaults to 1 for systems with
46944694
more than 32MB of RAM, 0 otherwise.
46954695

4696-
slub_debug[=options[,slabs]] [MM, SLUB]
4696+
slub_debug[=options[,slabs][;[options[,slabs]]...] [MM, SLUB]
46974697
Enabling slub_debug allows one to determine the
46984698
culprit if slab objects become corrupted. Enabling
46994699
slub_debug can create guard zones around objects and

Documentation/dev-tools/kasan.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ KASAN uses compile-time instrumentation to insert validity checks before every
1313
memory access, and therefore requires a compiler version that supports that.
1414

1515
Generic KASAN is supported in both GCC and Clang. With GCC it requires version
16-
4.9.2 or later for basic support and version 5.0 or later for detection of
17-
out-of-bounds accesses for stack and global variables and for inline
18-
instrumentation mode (see the Usage section). With Clang it requires version
19-
7.0.0 or later and it doesn't support detection of out-of-bounds accesses for
20-
global variables yet.
16+
8.3.0 or later. With Clang it requires version 7.0.0 or later, but detection of
17+
out-of-bounds accesses for global variables is only supported since Clang 11.
2118

2219
Tag-based KASAN is only supported in Clang and requires version 7.0.0 or later.
2320

@@ -193,6 +190,9 @@ function calls GCC directly inserts the code to check the shadow memory.
193190
This option significantly enlarges kernel but it gives x1.1-x2 performance
194191
boost over outline instrumented kernel.
195192

193+
Generic KASAN prints up to 2 call_rcu() call stacks in reports, the last one
194+
and the second to last.
195+
196196
Software tag-based KASAN
197197
~~~~~~~~~~~~~~~~~~~~~~~~
198198

Documentation/filesystems/dlmfs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dlmfs is built with OCFS2 as it requires most of its infrastructure.
1212

1313
:Project web page: http://ocfs2.wiki.kernel.org
1414
:Tools web page: https://github.com/markfasheh/ocfs2-tools
15-
:OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
15+
:OCFS2 mailing lists: https://oss.oracle.com/projects/ocfs2/mailman/
1616

1717
All code copyright 2005 Oracle except when otherwise noted.
1818

Documentation/filesystems/ocfs2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ get "mount.ocfs2" and "ocfs2_hb_ctl".
1414

1515
Project web page: http://ocfs2.wiki.kernel.org
1616
Tools git tree: https://github.com/markfasheh/ocfs2-tools
17-
OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
17+
OCFS2 mailing lists: https://oss.oracle.com/projects/ocfs2/mailman/
1818

1919
All code copyright 2005 Oracle except when otherwise noted.
2020

Documentation/filesystems/tmpfs.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,22 @@ These options do not have any effect on remount. You can change these
150150
parameters with chmod(1), chown(1) and chgrp(1) on a mounted filesystem.
151151

152152

153+
tmpfs has a mount option to select whether it will wrap at 32- or 64-bit inode
154+
numbers:
155+
156+
======= ========================
157+
inode64 Use 64-bit inode numbers
158+
inode32 Use 32-bit inode numbers
159+
======= ========================
160+
161+
On a 32-bit kernel, inode32 is implicit, and inode64 is refused at mount time.
162+
On a 64-bit kernel, CONFIG_TMPFS_INODE64 sets the default. inode64 avoids the
163+
possibility of multiple files with the same inode number on a single device;
164+
but risks glibc failing with EOVERFLOW once 33-bit inode numbers are reached -
165+
if a long-lived tmpfs is accessed by 32-bit applications so ancient that
166+
opening a file larger than 2GiB fails with EINVAL.
167+
168+
153169
So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'
154170
will give you tmpfs instance on /mytmpfs which can allocate 10GB
155171
RAM/SWAP in 10240 inodes and it is only accessible by root.
@@ -161,3 +177,5 @@ RAM/SWAP in 10240 inodes and it is only accessible by root.
161177
Hugh Dickins, 4 June 2007
162178
:Updated:
163179
KOSAKI Motohiro, 16 Mar 2010
180+
:Updated:
181+
Chris Down, 13 July 2020

Documentation/vm/arch_pgtable_helpers.rst

Lines changed: 258 additions & 0 deletions
Large diffs are not rendered by default.

Documentation/vm/memory-model.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,8 @@ sections:
141141
`mem_section` objects and the number of rows is calculated to fit
142142
all the memory sections.
143143

144-
The architecture setup code should call :c:func:`memory_present` for
145-
each active memory range or use :c:func:`memblocks_present` or
146-
:c:func:`sparse_memory_present_with_active_regions` wrappers to
147-
initialize the memory sections. Next, the actual memory maps should be
148-
set up using :c:func:`sparse_init`.
144+
The architecture setup code should call sparse_init() to
145+
initialize the memory sections and the memory maps.
149146

150147
With SPARSEMEM there are two possible ways to convert a PFN to the
151148
corresponding `struct page` - a "classic sparse" and "sparse
@@ -178,7 +175,7 @@ for persistent memory devices in pre-allocated storage on those
178175
devices. This storage is represented with :c:type:`struct vmem_altmap`
179176
that is eventually passed to vmemmap_populate() through a long chain
180177
of function calls. The vmemmap_populate() implementation may use the
181-
`vmem_altmap` along with :c:func:`altmap_alloc_block_buf` helper to
178+
`vmem_altmap` along with :c:func:`vmemmap_alloc_block_buf` helper to
182179
allocate memory map on the persistent memory device.
183180

184181
ZONE_DEVICE

Documentation/vm/slub.rst

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ slub_debug=<Debug-Options>,<slab name1>,<slab name2>,...
4141
Enable options only for select slabs (no spaces
4242
after a comma)
4343

44+
Multiple blocks of options for all slabs or selected slabs can be given, with
45+
blocks of options delimited by ';'. The last of "all slabs" blocks is applied
46+
to all slabs except those that match one of the "select slabs" block. Options
47+
of the first "select slabs" blocks that matches the slab's name are applied.
48+
4449
Possible debug options are::
4550

4651
F Sanity checks on (enables SLAB_DEBUG_CONSISTENCY_CHECKS
@@ -83,17 +88,33 @@ switch off debugging for such caches by default, use::
8388

8489
slub_debug=O
8590

86-
In case you forgot to enable debugging on the kernel command line: It is
87-
possible to enable debugging manually when the kernel is up. Look at the
88-
contents of::
91+
You can apply different options to different list of slab names, using blocks
92+
of options. This will enable red zoning for dentry and user tracking for
93+
kmalloc. All other slabs will not get any debugging enabled::
94+
95+
slub_debug=Z,dentry;U,kmalloc-*
96+
97+
You can also enable options (e.g. sanity checks and poisoning) for all caches
98+
except some that are deemed too performance critical and don't need to be
99+
debugged by specifying global debug options followed by a list of slab names
100+
with "-" as options::
101+
102+
slub_debug=FZ;-,zs_handle,zspage
103+
104+
The state of each debug option for a slab can be found in the respective files
105+
under::
89106

90107
/sys/kernel/slab/<slab name>/
91108

92-
Look at the writable files. Writing 1 to them will enable the
93-
corresponding debug option. All options can be set on a slab that does
94-
not contain objects. If the slab already contains objects then sanity checks
95-
and tracing may only be enabled. The other options may cause the realignment
96-
of objects.
109+
If the file contains 1, the option is enabled, 0 means disabled. The debug
110+
options from the ``slub_debug`` parameter translate to the following files::
111+
112+
F sanity_checks
113+
Z red_zone
114+
P poison
115+
U store_user
116+
T trace
117+
A failslab
97118

98119
Careful with tracing: It may spew out lots of information and never stop if
99120
used on the wrong slab.

arch/alpha/include/asm/pgalloc.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/mm.h>
66
#include <linux/mmzone.h>
77

8-
#include <asm-generic/pgalloc.h> /* for pte_{alloc,free}_one */
8+
#include <asm-generic/pgalloc.h>
99

1010
/*
1111
* Allocate and free page tables. The xxx_kernel() versions are
@@ -34,23 +34,4 @@ pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
3434

3535
extern pgd_t *pgd_alloc(struct mm_struct *mm);
3636

37-
static inline void
38-
pgd_free(struct mm_struct *mm, pgd_t *pgd)
39-
{
40-
free_page((unsigned long)pgd);
41-
}
42-
43-
static inline pmd_t *
44-
pmd_alloc_one(struct mm_struct *mm, unsigned long address)
45-
{
46-
pmd_t *ret = (pmd_t *)__get_free_page(GFP_PGTABLE_USER);
47-
return ret;
48-
}
49-
50-
static inline void
51-
pmd_free(struct mm_struct *mm, pmd_t *pmd)
52-
{
53-
free_page((unsigned long)pmd);
54-
}
55-
5637
#endif /* _ALPHA_PGALLOC_H */

arch/alpha/include/asm/tlbflush.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <linux/mm.h>
66
#include <linux/sched.h>
77
#include <asm/compiler.h>
8-
#include <asm/pgalloc.h>
98

109
#ifndef __EXTERN_INLINE
1110
#define __EXTERN_INLINE extern inline

0 commit comments

Comments
 (0)