Skip to content

Commit 902861e

Browse files
committed
Merge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM updates from Andrew Morton: - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames from hotplugged memory rather than only from main memory. Series "implement "memmap on memory" feature on s390". - More folio conversions from Matthew Wilcox in the series "Convert memcontrol charge moving to use folios" "mm: convert mm counter to take a folio" - Chengming Zhou has optimized zswap's rbtree locking, providing significant reductions in system time and modest but measurable reductions in overall runtimes. The series is "mm/zswap: optimize the scalability of zswap rb-tree". - Chengming Zhou has also provided the series "mm/zswap: optimize zswap lru list" which provides measurable runtime benefits in some swap-intensive situations. - And Chengming Zhou further optimizes zswap in the series "mm/zswap: optimize for dynamic zswap_pools". Measured improvements are modest. - zswap cleanups and simplifications from Yosry Ahmed in the series "mm: zswap: simplify zswap_swapoff()". - In the series "Add DAX ABI for memmap_on_memory", Vishal Verma has contributed several DAX cleanups as well as adding a sysfs tunable to control the memmap_on_memory setting when the dax device is hotplugged as system memory. - Johannes Weiner has added the large series "mm: zswap: cleanups", which does that. - More DAMON work from SeongJae Park in the series "mm/damon: make DAMON debugfs interface deprecation unignorable" "selftests/damon: add more tests for core functionalities and corner cases" "Docs/mm/damon: misc readability improvements" "mm/damon: let DAMOS feeds and tame/auto-tune itself" - In the series "mm/mempolicy: weighted interleave mempolicy and sysfs extension" Rakie Kim has developed a new mempolicy interleaving policy wherein we allocate memory across nodes in a weighted fashion rather than uniformly. This is beneficial in heterogeneous memory environments appearing with CXL. - Christophe Leroy has contributed some cleanup and consolidation work against the ARM pagetable dumping code in the series "mm: ptdump: Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute". - Luis Chamberlain has added some additional xarray selftesting in the series "test_xarray: advanced API multi-index tests". - Muhammad Usama Anjum has reworked the selftest code to make its human-readable output conform to the TAP ("Test Anything Protocol") format. Amongst other things, this opens up the use of third-party tools to parse and process out selftesting results. - Ryan Roberts has added fork()-time PTE batching of THP ptes in the series "mm/memory: optimize fork() with PTE-mapped THP". Mainly targeted at arm64, this significantly speeds up fork() when the process has a large number of pte-mapped folios. - David Hildenbrand also gets in on the THP pte batching game in his series "mm/memory: optimize unmap/zap with PTE-mapped THP". It implements batching during munmap() and other pte teardown situations. The microbenchmark improvements are nice. - And in the series "Transparent Contiguous PTEs for User Mappings" Ryan Roberts further utilizes arm's pte's contiguous bit ("contpte mappings"). Kernel build times on arm64 improved nicely. Ryan's series "Address some contpte nits" provides some followup work. - In the series "mm/hugetlb: Restore the reservation" Breno Leitao has fixed an obscure hugetlb race which was causing unnecessary page faults. He has also added a reproducer under the selftest code. - In the series "selftests/mm: Output cleanups for the compaction test", Mark Brown did what the title claims. - Kinsey Ho has added the series "mm/mglru: code cleanup and refactoring". - Even more zswap material from Nhat Pham. The series "fix and extend zswap kselftests" does as claimed. - In the series "Introduce cpu_dcache_is_aliasing() to fix DAX regression" Mathieu Desnoyers has cleaned up and fixed rather a mess in our handling of DAX on archiecctures which have virtually aliasing data caches. The arm architecture is the main beneficiary. - Lokesh Gidra's series "per-vma locks in userfaultfd" provides dramatic improvements in worst-case mmap_lock hold times during certain userfaultfd operations. - Some page_owner enhancements and maintenance work from Oscar Salvador in his series "page_owner: print stacks and their outstanding allocations" "page_owner: Fixup and cleanup" - Uladzislau Rezki has contributed some vmalloc scalability improvements in his series "Mitigate a vmap lock contention". It realizes a 12x improvement for a certain microbenchmark. - Some kexec/crash cleanup work from Baoquan He in the series "Split crash out from kexec and clean up related config items". - Some zsmalloc maintenance work from Chengming Zhou in the series "mm/zsmalloc: fix and optimize objects/page migration" "mm/zsmalloc: some cleanup for get/set_zspage_mapping()" - Zi Yan has taught the MM to perform compaction on folios larger than order=0. This a step along the path to implementaton of the merging of large anonymous folios. The series is named "Enable >0 order folio memory compaction". - Christoph Hellwig has done quite a lot of cleanup work in the pagecache writeback code in his series "convert write_cache_pages() to an iterator". - Some modest hugetlb cleanups and speedups in Vishal Moola's series "Handle hugetlb faults under the VMA lock". - Zi Yan has changed the page splitting code so we can split huge pages into sizes other than order-0 to better utilize large folios. The series is named "Split a folio to any lower order folios". - David Hildenbrand has contributed the series "mm: remove total_mapcount()", a cleanup. - Matthew Wilcox has sought to improve the performance of bulk memory freeing in his series "Rearrange batched folio freeing". - Gang Li's series "hugetlb: parallelize hugetlb page init on boot" provides large improvements in bootup times on large machines which are configured to use large numbers of hugetlb pages. - Matthew Wilcox's series "PageFlags cleanups" does that. - Qi Zheng's series "minor fixes and supplement for ptdesc" does that also. S390 is affected. - Cleanups to our pagemap utility functions from Peter Xu in his series "mm/treewide: Replace pXd_large() with pXd_leaf()". - Nico Pache has fixed a few things with our hugepage selftests in his series "selftests/mm: Improve Hugepage Test Handling in MM Selftests". - Also, of course, many singleton patches to many things. Please see the individual changelogs for details. * tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (435 commits) mm/zswap: remove the memcpy if acomp is not sleepable crypto: introduce: acomp_is_async to expose if comp drivers might sleep memtest: use {READ,WRITE}_ONCE in memory scanning mm: prohibit the last subpage from reusing the entire large folio mm: recover pud_leaf() definitions in nopmd case selftests/mm: skip the hugetlb-madvise tests on unmet hugepage requirements selftests/mm: skip uffd hugetlb tests with insufficient hugepages selftests/mm: dont fail testsuite due to a lack of hugepages mm/huge_memory: skip invalid debugfs new_order input for folio split mm/huge_memory: check new folio order when split a folio mm, vmscan: retry kswapd's priority loop with cache_trim_mode off on failure mm: add an explicit smp_wmb() to UFFDIO_CONTINUE mm: fix list corruption in put_pages_list mm: remove folio from deferred split list before uncharging it filemap: avoid unnecessary major faults in filemap_fault() mm,page_owner: drop unnecessary check mm,page_owner: check for null stack_record before bumping its refcount mm: swap: fix race between free_swap_and_cache() and swapoff() mm/treewide: align up pXd_leaf() retval across archs mm/treewide: drop pXd_large() ...
2 parents 1bbeaf8 + 270700d commit 902861e

File tree

364 files changed

+12417
-6103
lines changed

Some content is hidden

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

364 files changed

+12417
-6103
lines changed
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
What: /sys/bus/dax/devices/daxX.Y/align
2+
Date: October, 2020
3+
KernelVersion: v5.10
4+
Contact: nvdimm@lists.linux.dev
5+
Description:
6+
(RW) Provides a way to specify an alignment for a dax device.
7+
Values allowed are constrained by the physical address ranges
8+
that back the dax device, and also by arch requirements.
9+
10+
What: /sys/bus/dax/devices/daxX.Y/mapping
11+
Date: October, 2020
12+
KernelVersion: v5.10
13+
Contact: nvdimm@lists.linux.dev
14+
Description:
15+
(WO) Provides a way to allocate a mapping range under a dax
16+
device. Specified in the format <start>-<end>.
17+
18+
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/start
19+
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/end
20+
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/page_offset
21+
Date: October, 2020
22+
KernelVersion: v5.10
23+
Contact: nvdimm@lists.linux.dev
24+
Description:
25+
(RO) A dax device may have multiple constituent discontiguous
26+
address ranges. These are represented by the different
27+
'mappingX' subdirectories. The 'start' attribute indicates the
28+
start physical address for the given range. The 'end' attribute
29+
indicates the end physical address for the given range. The
30+
'page_offset' attribute indicates the offset of the current
31+
range in the dax device.
32+
33+
What: /sys/bus/dax/devices/daxX.Y/resource
34+
Date: June, 2019
35+
KernelVersion: v5.3
36+
Contact: nvdimm@lists.linux.dev
37+
Description:
38+
(RO) The resource attribute indicates the starting physical
39+
address of a dax device. In case of a device with multiple
40+
constituent ranges, it indicates the starting address of the
41+
first range.
42+
43+
What: /sys/bus/dax/devices/daxX.Y/size
44+
Date: October, 2020
45+
KernelVersion: v5.10
46+
Contact: nvdimm@lists.linux.dev
47+
Description:
48+
(RW) The size attribute indicates the total size of a dax
49+
device. For creating subdivided dax devices, or for resizing
50+
an existing device, the new size can be written to this as
51+
part of the reconfiguration process.
52+
53+
What: /sys/bus/dax/devices/daxX.Y/numa_node
54+
Date: November, 2019
55+
KernelVersion: v5.5
56+
Contact: nvdimm@lists.linux.dev
57+
Description:
58+
(RO) If NUMA is enabled and the platform has affinitized the
59+
backing device for this dax device, emit the CPU node
60+
affinity for this device.
61+
62+
What: /sys/bus/dax/devices/daxX.Y/target_node
63+
Date: February, 2019
64+
KernelVersion: v5.1
65+
Contact: nvdimm@lists.linux.dev
66+
Description:
67+
(RO) The target-node attribute is the Linux numa-node that a
68+
device-dax instance may create when it is online. Prior to
69+
being online the device's 'numa_node' property reflects the
70+
closest online cpu node which is the typical expectation of a
71+
device 'numa_node'. Once it is online it becomes its own
72+
distinct numa node.
73+
74+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size
75+
Date: October, 2020
76+
KernelVersion: v5.10
77+
Contact: nvdimm@lists.linux.dev
78+
Description:
79+
(RO) The available_size attribute tracks available dax region
80+
capacity. This only applies to volatile hmem devices, not pmem
81+
devices, since pmem devices are defined by nvdimm namespace
82+
boundaries.
83+
84+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/size
85+
Date: July, 2017
86+
KernelVersion: v5.1
87+
Contact: nvdimm@lists.linux.dev
88+
Description:
89+
(RO) The size attribute indicates the size of a given dax region
90+
in bytes.
91+
92+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align
93+
Date: October, 2020
94+
KernelVersion: v5.10
95+
Contact: nvdimm@lists.linux.dev
96+
Description:
97+
(RO) The align attribute indicates alignment of the dax region.
98+
Changes on align may not always be valid, when say certain
99+
mappings were created with 2M and then we switch to 1G. This
100+
validates all ranges against the new value being attempted, post
101+
resizing.
102+
103+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed
104+
Date: October, 2020
105+
KernelVersion: v5.10
106+
Contact: nvdimm@lists.linux.dev
107+
Description:
108+
(RO) The seed device is a concept for dynamic dax regions to be
109+
able to split the region amongst multiple sub-instances. The
110+
seed device, similar to libnvdimm seed devices, is a device
111+
that starts with zero capacity allocated and unbound to a
112+
driver.
113+
114+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/create
115+
Date: October, 2020
116+
KernelVersion: v5.10
117+
Contact: nvdimm@lists.linux.dev
118+
Description:
119+
(RW) The create interface to the dax region provides a way to
120+
create a new unconfigured dax device under the given region, which
121+
can then be configured (with a size etc.) and then probed.
122+
123+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete
124+
Date: October, 2020
125+
KernelVersion: v5.10
126+
Contact: nvdimm@lists.linux.dev
127+
Description:
128+
(WO) The delete interface for a dax region provides for deletion
129+
of any 0-sized and idle dax devices.
130+
131+
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id
132+
Date: July, 2017
133+
KernelVersion: v5.1
134+
Contact: nvdimm@lists.linux.dev
135+
Description:
136+
(RO) The id attribute indicates the region id of a dax region.
137+
138+
What: /sys/bus/dax/devices/daxX.Y/memmap_on_memory
139+
Date: January, 2024
140+
KernelVersion: v6.8
141+
Contact: nvdimm@lists.linux.dev
142+
Description:
143+
(RW) Control the memmap_on_memory setting if the dax device
144+
were to be hotplugged as system memory. This determines whether
145+
the 'altmap' for the hotplugged memory will be placed on the
146+
device being hotplugged (memmap_on_memory=1) or if it will be
147+
placed on regular memory (memmap_on_memory=0). This attribute
148+
must be set before the device is handed over to the 'kmem'
149+
driver (i.e. hotplugged into system-ram). Additionally, this
150+
depends on CONFIG_MHP_MEMMAP_ON_MEMORY, and a globally enabled
151+
memmap_on_memory parameter for memory_hotplug. This is
152+
typically set on the kernel command line -
153+
memory_hotplug.memmap_on_memory set to 'true' or 'force'."

Documentation/ABI/testing/sysfs-kernel-mm-cma

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ Date: Feb 2021
2323
Contact: Minchan Kim <minchan@kernel.org>
2424
Description:
2525
the number of pages CMA API failed to allocate
26+
27+
What: /sys/kernel/mm/cma/<cma-heap-name>/release_pages_success
28+
Date: Feb 2024
29+
Contact: Anshuman Khandual <anshuman.khandual@arm.com>
30+
Description:
31+
the number of pages CMA API succeeded to release

Documentation/ABI/testing/sysfs-kernel-mm-damon

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ Description: Writing 'on' or 'off' to this file makes the kdamond starts or
3434
kdamond. Writing 'update_schemes_tried_bytes' to the file
3535
updates only '.../tried_regions/total_bytes' files of this
3636
kdamond. Writing 'clear_schemes_tried_regions' to the file
37-
removes contents of the 'tried_regions' directory.
37+
removes contents of the 'tried_regions' directory. Writing
38+
'update_schemes_effective_quotas' to the file updates
39+
'.../quotas/effective_bytes' files of this kdamond.
3840

3941
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/pid
4042
Date: Mar 2022
@@ -208,6 +210,12 @@ Contact: SeongJae Park <sj@kernel.org>
208210
Description: Writing to and reading from this file sets and gets the size
209211
quota of the scheme in bytes.
210212

213+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/effective_bytes
214+
Date: Feb 2024
215+
Contact: SeongJae Park <sj@kernel.org>
216+
Description: Reading from this file gets the effective size quota of the
217+
scheme in bytes, which adjusted for the time quota and goals.
218+
211219
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms
212220
Date: Mar 2022
213221
Contact: SeongJae Park <sj@kernel.org>
@@ -221,6 +229,12 @@ Description: Writing a number 'N' to this file creates the number of
221229
directories for setting automatic tuning of the scheme's
222230
aggressiveness named '0' to 'N-1' under the goals/ directory.
223231

232+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_metric
233+
Date: Feb 2024
234+
Contact: SeongJae Park <sj@kernel.org>
235+
Description: Writing to and reading from this file sets and gets the quota
236+
auto-tuning goal metric.
237+
224238
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_value
225239
Date: Nov 2023
226240
Contact: SeongJae Park <sj@kernel.org>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
What: /sys/kernel/mm/mempolicy/
2+
Date: January 2024
3+
Contact: Linux memory management mailing list <linux-mm@kvack.org>
4+
Description: Interface for Mempolicy
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
What: /sys/kernel/mm/mempolicy/weighted_interleave/
2+
Date: January 2024
3+
Contact: Linux memory management mailing list <linux-mm@kvack.org>
4+
Description: Configuration Interface for the Weighted Interleave policy
5+
6+
What: /sys/kernel/mm/mempolicy/weighted_interleave/nodeN
7+
Date: January 2024
8+
Contact: Linux memory management mailing list <linux-mm@kvack.org>
9+
Description: Weight configuration interface for nodeN
10+
11+
The interleave weight for a memory node (N). These weights are
12+
utilized by tasks which have set their mempolicy to
13+
MPOL_WEIGHTED_INTERLEAVE.
14+
15+
These weights only affect new allocations, and changes at runtime
16+
will not cause migrations on already allocated pages.
17+
18+
The minimum weight for a node is always 1.
19+
20+
Minimum weight: 1
21+
Maximum weight: 255
22+
23+
Writing an empty string or `0` will reset the weight to the
24+
system default. The system default may be set by the kernel
25+
or drivers at boot or during hotplug events.

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ Defines the beginning of the text section. In general, _stext indicates
6565
the kernel start address. Used to convert a virtual address from the
6666
direct kernel map to a physical address.
6767

68-
vmap_area_list
69-
--------------
68+
VMALLOC_START
69+
-------------
7070

71-
Stores the virtual area list. makedumpfile gets the vmalloc start value
72-
from this variable and its value is necessary for vmalloc translation.
71+
Stores the base address of vmalloc area. makedumpfile gets this value
72+
since is necessary for vmalloc translation.
7373

7474
mem_map
7575
-------

Documentation/admin-guide/mm/damon/reclaim.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,33 @@ milliseconds.
117117

118118
1 second by default.
119119

120+
quota_mem_pressure_us
121+
---------------------
122+
123+
Desired level of memory pressure-stall time in microseconds.
124+
125+
While keeping the caps that set by other quotas, DAMON_RECLAIM automatically
126+
increases and decreases the effective level of the quota aiming this level of
127+
memory pressure is incurred. System-wide ``some`` memory PSI in microseconds
128+
per quota reset interval (``quota_reset_interval_ms``) is collected and
129+
compared to this value to see if the aim is satisfied. Value zero means
130+
disabling this auto-tuning feature.
131+
132+
Disabled by default.
133+
134+
quota_autotune_feedback
135+
-----------------------
136+
137+
User-specifiable feedback for auto-tuning of the effective quota.
138+
139+
While keeping the caps that set by other quotas, DAMON_RECLAIM automatically
140+
increases and decreases the effective level of the quota aiming receiving this
141+
feedback of value ``10,000`` from the user. DAMON_RECLAIM assumes the feedback
142+
value and the quota are positively proportional. Value zero means disabling
143+
this auto-tuning feature.
144+
145+
Disabled by default.
146+
120147
wmarks_interval
121148
---------------
122149

0 commit comments

Comments
 (0)