Skip to content

Commit 68abbe7

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - a few misc things - ocfs2 updates - v9fs updates - MM - procfs updates - lib/ updates - autofs updates * emailed patches from Andrew Morton <[email protected]>: (118 commits) autofs: small cleanup in autofs_getpath() autofs: clean up includes autofs: comment on selinux changes needed for module autoload autofs: update MAINTAINERS entry for autofs autofs: use autofs instead of autofs4 in documentation autofs: rename autofs documentation files autofs: create autofs Kconfig and Makefile autofs: delete fs/autofs4 source files autofs: update fs/autofs4/Makefile autofs: update fs/autofs4/Kconfig autofs: copy autofs4 to autofs autofs4: use autofs instead of autofs4 everywhere autofs4: merge auto_fs.h and auto_fs4.h fs/binfmt_misc.c: do not allow offset overflow checkpatch: improve patch recognition lib/ucs2_string.c: add MODULE_LICENSE() lib/mpi: headers cleanup lib/percpu_ida.c: use _irqsave() instead of local_irq_save() + spin_lock lib/idr.c: remove simple_ida_lock lib/bitmap.c: micro-optimization for __bitmap_complement() ...
2 parents ba1b730 + 016e92d commit 68abbe7

File tree

147 files changed

+2945
-2066
lines changed

Some content is hidden

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

147 files changed

+2945
-2066
lines changed

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,14 +1001,44 @@ PAGE_SIZE multiple when read back.
10011001
The total amount of memory currently being used by the cgroup
10021002
and its descendants.
10031003

1004+
memory.min
1005+
A read-write single value file which exists on non-root
1006+
cgroups. The default is "0".
1007+
1008+
Hard memory protection. If the memory usage of a cgroup
1009+
is within its effective min boundary, the cgroup's memory
1010+
won't be reclaimed under any conditions. If there is no
1011+
unprotected reclaimable memory available, OOM killer
1012+
is invoked.
1013+
1014+
Effective min boundary is limited by memory.min values of
1015+
all ancestor cgroups. If there is memory.min overcommitment
1016+
(child cgroup or cgroups are requiring more protected memory
1017+
than parent will allow), then each child cgroup will get
1018+
the part of parent's protection proportional to its
1019+
actual memory usage below memory.min.
1020+
1021+
Putting more memory than generally available under this
1022+
protection is discouraged and may lead to constant OOMs.
1023+
1024+
If a memory cgroup is not populated with processes,
1025+
its memory.min is ignored.
1026+
10041027
memory.low
10051028
A read-write single value file which exists on non-root
10061029
cgroups. The default is "0".
10071030

1008-
Best-effort memory protection. If the memory usages of a
1009-
cgroup and all its ancestors are below their low boundaries,
1010-
the cgroup's memory won't be reclaimed unless memory can be
1011-
reclaimed from unprotected cgroups.
1031+
Best-effort memory protection. If the memory usage of a
1032+
cgroup is within its effective low boundary, the cgroup's
1033+
memory won't be reclaimed unless memory can be reclaimed
1034+
from unprotected cgroups.
1035+
1036+
Effective low boundary is limited by memory.low values of
1037+
all ancestor cgroups. If there is memory.low overcommitment
1038+
(child cgroup or cgroups are requiring more protected memory
1039+
than parent will allow), then each child cgroup will get
1040+
the part of parent's protection proportional to its
1041+
actual memory usage below memory.low.
10121042

10131043
Putting more memory than generally available under this
10141044
protection is discouraged.
@@ -1199,6 +1229,27 @@ PAGE_SIZE multiple when read back.
11991229
Swap usage hard limit. If a cgroup's swap usage reaches this
12001230
limit, anonymous memory of the cgroup will not be swapped out.
12011231

1232+
memory.swap.events
1233+
A read-only flat-keyed file which exists on non-root cgroups.
1234+
The following entries are defined. Unless specified
1235+
otherwise, a value change in this file generates a file
1236+
modified event.
1237+
1238+
max
1239+
The number of times the cgroup's swap usage was about
1240+
to go over the max boundary and swap allocation
1241+
failed.
1242+
1243+
fail
1244+
The number of times swap allocation failed either
1245+
because of running out of swap system-wide or max
1246+
limit.
1247+
1248+
When reduced under the current usage, the existing swap
1249+
entries are reclaimed gradually and the swap usage may stay
1250+
higher than the limit for an extended period of time. This
1251+
reduces the impact on the workload and memory management.
1252+
12021253

12031254
Usage Guidelines
12041255
~~~~~~~~~~~~~~~~
@@ -1934,17 +1985,8 @@ system performance due to overreclaim, to the point where the feature
19341985
becomes self-defeating.
19351986

19361987
The memory.low boundary on the other hand is a top-down allocated
1937-
reserve. A cgroup enjoys reclaim protection when it and all its
1938-
ancestors are below their low boundaries, which makes delegation of
1939-
subtrees possible. Secondly, new cgroups have no reserve per default
1940-
and in the common case most cgroups are eligible for the preferred
1941-
reclaim pass. This allows the new low boundary to be efficiently
1942-
implemented with just a minor addition to the generic reclaim code,
1943-
without the need for out-of-band data structures and reclaim passes.
1944-
Because the generic reclaim code considers all cgroups except for the
1945-
ones running low in the preferred first reclaim pass, overreclaim of
1946-
individual groups is eliminated as well, resulting in much better
1947-
overall workload performance.
1988+
reserve. A cgroup enjoys reclaim protection when it's within its low,
1989+
which makes delegation of subtrees possible.
19481990

19491991
The original high boundary, the hard limit, is defined as a strict
19501992
limit that can not budge, even if the OOM killer has to be called.

Documentation/blockdev/zram.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ line of text and contains the following stats separated by whitespace:
218218
same_pages the number of same element filled pages written to this disk.
219219
No memory is allocated for such pages.
220220
pages_compacted the number of pages freed during compaction
221+
huge_pages the number of incompressible pages
221222

222223
9) Deactivate:
223224
swapoff /dev/zram0
@@ -242,5 +243,29 @@ to backing storage rather than keeping it in memory.
242243
User should set up backing device via /sys/block/zramX/backing_dev
243244
before disksize setting.
244245

246+
= memory tracking
247+
248+
With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the
249+
zram block. It could be useful to catch cold or incompressible
250+
pages of the process with*pagemap.
251+
If you enable the feature, you could see block state via
252+
/sys/kernel/debug/zram/zram0/block_state". The output is as follows,
253+
254+
300 75.033841 .wh
255+
301 63.806904 s..
256+
302 63.806919 ..h
257+
258+
First column is zram's block index.
259+
Second column is access time since the system was booted
260+
Third column is state of the block.
261+
(s: same page
262+
w: written page to backing store
263+
h: huge page)
264+
265+
First line of above example says 300th block is accessed at 75.033841sec
266+
and the block's state is huge so it is written back to the backing
267+
storage. It's a debugging feature so anyone shouldn't rely on it to work
268+
properly.
269+
245270
Nitin Gupta
246271

Documentation/features/vm/pte_special/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Feature name: pte_special
3-
# Kconfig: __HAVE_ARCH_PTE_SPECIAL
3+
# Kconfig: ARCH_HAS_PTE_SPECIAL
44
# description: arch supports the pte_special()/pte_mkspecial() VM APIs
55
#
66
-----------------------

Documentation/filesystems/00-INDEX

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ afs.txt
1010
- info and examples for the distributed AFS (Andrew File System) fs.
1111
affs.txt
1212
- info and mount options for the Amiga Fast File System.
13-
autofs4-mount-control.txt
14-
- info on device control operations for autofs4 module.
13+
autofs-mount-control.txt
14+
- info on device control operations for autofs module.
1515
automount-support.txt
1616
- information about filesystem automount support.
1717
befs.txt

Documentation/filesystems/autofs4-mount-control.txt renamed to Documentation/filesystems/autofs-mount-control.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Miscellaneous Device control operations for the autofs4 kernel module
2+
Miscellaneous Device control operations for the autofs kernel module
33
====================================================================
44

55
The problem
@@ -164,7 +164,7 @@ possibility for future development due to the requirements of the
164164
message bus architecture.
165165

166166

167-
autofs4 Miscellaneous Device mount control interface
167+
autofs Miscellaneous Device mount control interface
168168
====================================================
169169

170170
The control interface is opening a device node, typically /dev/autofs.
@@ -244,7 +244,7 @@ The device node ioctl operations implemented by this interface are:
244244
AUTOFS_DEV_IOCTL_VERSION
245245
------------------------
246246

247-
Get the major and minor version of the autofs4 device ioctl kernel module
247+
Get the major and minor version of the autofs device ioctl kernel module
248248
implementation. It requires an initialized struct autofs_dev_ioctl as an
249249
input parameter and sets the version information in the passed in structure.
250250
It returns 0 on success or the error -EINVAL if a version mismatch is
@@ -254,7 +254,7 @@ detected.
254254
AUTOFS_DEV_IOCTL_PROTOVER_CMD and AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD
255255
------------------------------------------------------------------
256256

257-
Get the major and minor version of the autofs4 protocol version understood
257+
Get the major and minor version of the autofs protocol version understood
258258
by loaded module. This call requires an initialized struct autofs_dev_ioctl
259259
with the ioctlfd field set to a valid autofs mount point descriptor
260260
and sets the requested version number in version field of struct args_protover
@@ -404,4 +404,3 @@ type is also given we are looking for a particular autofs mount and if
404404
a match isn't found a fail is returned. If the the located path is the
405405
root of a mount 1 is returned along with the super magic of the mount
406406
or 0 otherwise.
407-

Documentation/filesystems/autofs4.txt renamed to Documentation/filesystems/autofs.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ key advantages:
3030
Context
3131
-------
3232

33-
The "autofs4" filesystem module is only one part of an autofs system.
33+
The "autofs" filesystem module is only one part of an autofs system.
3434
There also needs to be a user-space program which looks up names
3535
and mounts filesystems. This will often be the "automount" program,
36-
though other tools including "systemd" can make use of "autofs4".
36+
though other tools including "systemd" can make use of "autofs".
3737
This document describes only the kernel module and the interactions
3838
required with any user-space program. Subsequent text refers to this
3939
as the "automount daemon" or simply "the daemon".
4040

41-
"autofs4" is a Linux kernel module with provides the "autofs"
41+
"autofs" is a Linux kernel module with provides the "autofs"
4242
filesystem type. Several "autofs" filesystems can be mounted and they
4343
can each be managed separately, or all managed by the same daemon.
4444

@@ -215,7 +215,7 @@ of expiry.
215215
The VFS also supports "expiry" of mounts using the MNT_EXPIRE flag to
216216
the `umount` system call. Unmounting with MNT_EXPIRE will fail unless
217217
a previous attempt had been made, and the filesystem has been inactive
218-
and untouched since that previous attempt. autofs4 does not depend on
218+
and untouched since that previous attempt. autofs does not depend on
219219
this but has its own internal tracking of whether filesystems were
220220
recently used. This allows individual names in the autofs directory
221221
to expire separately.
@@ -415,7 +415,7 @@ which can be used to communicate directly with the autofs filesystem.
415415
It requires CAP_SYS_ADMIN for access.
416416

417417
The `ioctl`s that can be used on this device are described in a separate
418-
document `autofs4-mount-control.txt`, and are summarized briefly here.
418+
document `autofs-mount-control.txt`, and are summarized briefly here.
419419
Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure:
420420

421421
struct autofs_dev_ioctl {

Documentation/filesystems/automount-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ also be requested by userspace.
99
IN-KERNEL AUTOMOUNTING
1010
======================
1111

12-
See section "Mount Traps" of Documentation/filesystems/autofs4.txt
12+
See section "Mount Traps" of Documentation/filesystems/autofs.txt
1313

1414
Then from userspace, you can just do something like:
1515

Documentation/filesystems/path-lookup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ this retry process in the next article.
460460
Automount points are locations in the filesystem where an attempt to
461461
lookup a name can trigger changes to how that lookup should be
462462
handled, in particular by mounting a filesystem there. These are
463-
covered in greater detail in autofs4.txt in the Linux documentation
463+
covered in greater detail in autofs.txt in the Linux documentation
464464
tree, but a few notes specifically related to path lookup are in order
465465
here.
466466

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7723,11 +7723,11 @@ W: https://linuxtv.org
77237723
S: Maintained
77247724
F: drivers/media/radio/radio-keene*
77257725

7726-
KERNEL AUTOMOUNTER v4 (AUTOFS4)
7726+
KERNEL AUTOMOUNTER
77277727
M: Ian Kent <[email protected]>
77287728
77297729
S: Maintained
7730-
F: fs/autofs4/
7730+
F: fs/autofs/
77317731

77327732
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
77337733
M: Masahiro Yamada <[email protected]>

arch/arc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ config ARC
4848
select HAVE_GENERIC_DMA_COHERENT
4949
select HAVE_KERNEL_GZIP
5050
select HAVE_KERNEL_LZMA
51+
select ARCH_HAS_PTE_SPECIAL
5152

5253
config MIGHT_HAVE_PCI
5354
bool

arch/arc/include/asm/pgtable.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,6 @@ PTE_BIT_FUNC(mkexec, |= (_PAGE_EXECUTE));
320320
PTE_BIT_FUNC(mkspecial, |= (_PAGE_SPECIAL));
321321
PTE_BIT_FUNC(mkhuge, |= (_PAGE_HW_SZ));
322322

323-
#define __HAVE_ARCH_PTE_SPECIAL
324-
325323
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
326324
{
327325
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config ARM
88
select ARCH_HAS_DEVMEM_IS_ALLOWED
99
select ARCH_HAS_ELF_RANDOMIZE
1010
select ARCH_HAS_FORTIFY_SOURCE
11+
select ARCH_HAS_PTE_SPECIAL if ARM_LPAE
1112
select ARCH_HAS_SET_MEMORY
1213
select ARCH_HAS_PHYS_TO_DMA
1314
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL

arch/arm/include/asm/pgtable-3level.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ static inline pte_t pte_mkspecial(pte_t pte)
219219
pte_val(pte) |= L_PTE_SPECIAL;
220220
return pte;
221221
}
222-
#define __HAVE_ARCH_PTE_SPECIAL
223222

224223
#define pmd_write(pmd) (pmd_isclear((pmd), L_PMD_SECT_RDONLY))
225224
#define pmd_dirty(pmd) (pmd_isset((pmd), L_PMD_SECT_DIRTY))

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config ARM64
1717
select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
1818
select ARCH_HAS_KCOV
1919
select ARCH_HAS_MEMBARRIER_SYNC_CORE
20+
select ARCH_HAS_PTE_SPECIAL
2021
select ARCH_HAS_SET_MEMORY
2122
select ARCH_HAS_SG_CHAIN
2223
select ARCH_HAS_STRICT_KERNEL_RWX

arch/arm64/include/asm/pgtable.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ static inline int pte_same(pte_t pte_a, pte_t pte_b)
306306
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
307307
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
308308

309-
#define __HAVE_ARCH_PTE_SPECIAL
310-
311309
static inline pte_t pgd_pte(pgd_t pgd)
312310
{
313311
return __pte(pgd_val(pgd));

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ config PPC
135135
select ARCH_HAS_GCOV_PROFILE_ALL
136136
select ARCH_HAS_PHYS_TO_DMA
137137
select ARCH_HAS_PMEM_API if PPC64
138+
select ARCH_HAS_PTE_SPECIAL
138139
select ARCH_HAS_MEMBARRIER_CALLBACKS
139140
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE
140141
select ARCH_HAS_SG_CHAIN

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,6 @@ extern unsigned long pci_io_base;
335335
/* Advertise special mapping type for AGP */
336336
#define HAVE_PAGE_AGP
337337

338-
/* Advertise support for _PAGE_SPECIAL */
339-
#define __HAVE_ARCH_PTE_SPECIAL
340-
341338
#ifndef __ASSEMBLY__
342339

343340
/*

arch/powerpc/include/asm/pte-common.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,6 @@ static inline bool pte_user(pte_t pte)
208208
#define PAGE_AGP (PAGE_KERNEL_NC)
209209
#define HAVE_PAGE_AGP
210210

211-
/* Advertise support for _PAGE_SPECIAL */
212-
#define __HAVE_ARCH_PTE_SPECIAL
213-
214211
#ifndef _PAGE_READ
215212
/* if not defined, we should not find _PAGE_WRITE too */
216213
#define _PAGE_READ 0

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ config RISCV
4242
select THREAD_INFO_IN_TASK
4343
select RISCV_TIMER
4444
select GENERIC_IRQ_MULTI_HANDLER
45+
select ARCH_HAS_PTE_SPECIAL
4546

4647
config MMU
4748
def_bool y

arch/riscv/include/asm/pgtable-bits.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,4 @@
4242
_PAGE_WRITE | _PAGE_EXEC | \
4343
_PAGE_USER | _PAGE_GLOBAL))
4444

45-
/* Advertise support for _PAGE_SPECIAL */
46-
#define __HAVE_ARCH_PTE_SPECIAL
47-
4845
#endif /* _ASM_RISCV_PGTABLE_BITS_H */

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ config S390
6565
select ARCH_HAS_GCOV_PROFILE_ALL
6666
select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
6767
select ARCH_HAS_KCOV
68+
select ARCH_HAS_PTE_SPECIAL
6869
select ARCH_HAS_SET_MEMORY
6970
select ARCH_HAS_SG_CHAIN
7071
select ARCH_HAS_STRICT_KERNEL_RWX

arch/s390/include/asm/pgtable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static inline int is_module_addr(void *addr)
171171
#define _PAGE_WRITE 0x020 /* SW pte write bit */
172172
#define _PAGE_SPECIAL 0x040 /* SW associated with special page */
173173
#define _PAGE_UNUSED 0x080 /* SW bit for pgste usage state */
174-
#define __HAVE_ARCH_PTE_SPECIAL
175174

176175
#ifdef CONFIG_MEM_SOFT_DIRTY
177176
#define _PAGE_SOFT_DIRTY 0x002 /* SW pte soft dirty bit */

0 commit comments

Comments
 (0)