Skip to content

Commit 3bf03b9

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - A few misc subsystems: kthread, scripts, ntfs, ocfs2, block, and vfs - Most the MM patches which precede the patches in Willy's tree: kasan, pagecache, gup, swap, shmem, memcg, selftests, pagemap, mremap, sparsemem, vmalloc, pagealloc, memory-failure, mlock, hugetlb, userfaultfd, vmscan, compaction, mempolicy, oom-kill, migration, thp, cma, autonuma, psi, ksm, page-poison, madvise, memory-hotplug, rmap, zswap, uaccess, ioremap, highmem, cleanups, kfence, hmm, and damon. * emailed patches from Andrew Morton <[email protected]>: (227 commits) mm/damon/sysfs: remove repeat container_of() in damon_sysfs_kdamond_release() Docs/ABI/testing: add DAMON sysfs interface ABI document Docs/admin-guide/mm/damon/usage: document DAMON sysfs interface selftests/damon: add a test for DAMON sysfs interface mm/damon/sysfs: support DAMOS stats mm/damon/sysfs: support DAMOS watermarks mm/damon/sysfs: support schemes prioritization mm/damon/sysfs: support DAMOS quotas mm/damon/sysfs: support DAMON-based Operation Schemes mm/damon/sysfs: support the physical address space monitoring mm/damon/sysfs: link DAMON for virtual address spaces monitoring mm/damon: implement a minimal stub for sysfs-based DAMON interface mm/damon/core: add number of each enum type values mm/damon/core: allow non-exclusive DAMON start/stop Docs/damon: update outdated term 'regions update interval' Docs/vm/damon/design: update DAMON-Idle Page Tracking interference handling Docs/vm/damon: call low level monitoring primitives the operations mm/damon: remove unnecessary CONFIG_DAMON option mm/damon/paddr,vaddr: remove damon_{p,v}a_{target_valid,set_operations}() mm/damon/dbgfs-test: fix is_target_id() change ...
2 parents 3fe2f74 + 15423a5 commit 3bf03b9

File tree

262 files changed

+6762
-2646
lines changed

Some content is hidden

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

262 files changed

+6762
-2646
lines changed
Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
what: /sys/kernel/mm/damon/
2+
Date: Mar 2022
3+
Contact: SeongJae Park <[email protected]>
4+
Description: Interface for Data Access MONitoring (DAMON). Contains files
5+
for controlling DAMON. For more details on DAMON itself,
6+
please refer to Documentation/admin-guide/mm/damon/index.rst.
7+
8+
What: /sys/kernel/mm/damon/admin/
9+
Date: Mar 2022
10+
Contact: SeongJae Park <[email protected]>
11+
Description: Interface for privileged users of DAMON. Contains files for
12+
controlling DAMON that aimed to be used by privileged users.
13+
14+
What: /sys/kernel/mm/damon/admin/kdamonds/nr_kdamonds
15+
Date: Mar 2022
16+
Contact: SeongJae Park <[email protected]>
17+
Description: Writing a number 'N' to this file creates the number of
18+
directories for controlling each DAMON worker thread (kdamond)
19+
named '0' to 'N-1' under the kdamonds/ directory.
20+
21+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/state
22+
Date: Mar 2022
23+
Contact: SeongJae Park <[email protected]>
24+
Description: Writing 'on' or 'off' to this file makes the kdamond starts or
25+
stops, respectively. Reading the file returns the keywords
26+
based on the current status. Writing 'update_schemes_stats' to
27+
the file updates contents of schemes stats files of the
28+
kdamond.
29+
30+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/pid
31+
Date: Mar 2022
32+
Contact: SeongJae Park <[email protected]>
33+
Description: Reading this file returns the pid of the kdamond if it is
34+
running.
35+
36+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts
37+
Date: Mar 2022
38+
Contact: SeongJae Park <[email protected]>
39+
Description: Writing a number 'N' to this file creates the number of
40+
directories for controlling each DAMON context named '0' to
41+
'N-1' under the contexts/ directory.
42+
43+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations
44+
Date: Mar 2022
45+
Contact: SeongJae Park <[email protected]>
46+
Description: Writing a keyword for a monitoring operations set ('vaddr' for
47+
virtual address spaces monitoring, and 'paddr' for the physical
48+
address space monitoring) to this file makes the context to use
49+
the operations set. Reading the file returns the keyword for
50+
the operations set the context is set to use.
51+
52+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us
53+
Date: Mar 2022
54+
Contact: SeongJae Park <[email protected]>
55+
Description: Writing a value to this file sets the sampling interval of the
56+
DAMON context in microseconds as the value. Reading this file
57+
returns the value.
58+
59+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us
60+
Date: Mar 2022
61+
Contact: SeongJae Park <[email protected]>
62+
Description: Writing a value to this file sets the aggregation interval of
63+
the DAMON context in microseconds as the value. Reading this
64+
file returns the value.
65+
66+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us
67+
Date: Mar 2022
68+
Contact: SeongJae Park <[email protected]>
69+
Description: Writing a value to this file sets the update interval of the
70+
DAMON context in microseconds as the value. Reading this file
71+
returns the value.
72+
73+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min
74+
75+
WDate: Mar 2022
76+
Contact: SeongJae Park <[email protected]>
77+
Description: Writing a value to this file sets the minimum number of
78+
monitoring regions of the DAMON context as the value. Reading
79+
this file returns the value.
80+
81+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max
82+
Date: Mar 2022
83+
Contact: SeongJae Park <[email protected]>
84+
Description: Writing a value to this file sets the maximum number of
85+
monitoring regions of the DAMON context as the value. Reading
86+
this file returns the value.
87+
88+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
89+
Date: Mar 2022
90+
Contact: SeongJae Park <[email protected]>
91+
Description: Writing a number 'N' to this file creates the number of
92+
directories for controlling each DAMON target of the context
93+
named '0' to 'N-1' under the contexts/ directory.
94+
95+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target
96+
Date: Mar 2022
97+
Contact: SeongJae Park <[email protected]>
98+
Description: Writing to and reading from this file sets and gets the pid of
99+
the target process if the context is for virtual address spaces
100+
monitoring, respectively.
101+
102+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions
103+
Date: Mar 2022
104+
Contact: SeongJae Park <[email protected]>
105+
Description: Writing a number 'N' to this file creates the number of
106+
directories for setting each DAMON target memory region of the
107+
context named '0' to 'N-1' under the regions/ directory. In
108+
case of the virtual address space monitoring, DAMON
109+
automatically sets the target memory region based on the target
110+
processes' mappings.
111+
112+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start
113+
Date: Mar 2022
114+
Contact: SeongJae Park <[email protected]>
115+
Description: Writing to and reading from this file sets and gets the start
116+
address of the monitoring region.
117+
118+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end
119+
Date: Mar 2022
120+
Contact: SeongJae Park <[email protected]>
121+
Description: Writing to and reading from this file sets and gets the end
122+
address of the monitoring region.
123+
124+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes
125+
Date: Mar 2022
126+
Contact: SeongJae Park <[email protected]>
127+
Description: Writing a number 'N' to this file creates the number of
128+
directories for controlling each DAMON-based operation scheme
129+
of the context named '0' to 'N-1' under the schemes/ directory.
130+
131+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action
132+
Date: Mar 2022
133+
Contact: SeongJae Park <[email protected]>
134+
Description: Writing to and reading from this file sets and gets the action
135+
of the scheme.
136+
137+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min
138+
Date: Mar 2022
139+
Contact: SeongJae Park <[email protected]>
140+
Description: Writing to and reading from this file sets and gets the mimimum
141+
size of the scheme's target regions in bytes.
142+
143+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max
144+
Date: Mar 2022
145+
Contact: SeongJae Park <[email protected]>
146+
Description: Writing to and reading from this file sets and gets the maximum
147+
size of the scheme's target regions in bytes.
148+
149+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min
150+
Date: Mar 2022
151+
Contact: SeongJae Park <[email protected]>
152+
Description: Writing to and reading from this file sets and gets the manimum
153+
'nr_accesses' of the scheme's target regions.
154+
155+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max
156+
Date: Mar 2022
157+
Contact: SeongJae Park <[email protected]>
158+
Description: Writing to and reading from this file sets and gets the maximum
159+
'nr_accesses' of the scheme's target regions.
160+
161+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min
162+
Date: Mar 2022
163+
Contact: SeongJae Park <[email protected]>
164+
Description: Writing to and reading from this file sets and gets the minimum
165+
'age' of the scheme's target regions.
166+
167+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max
168+
Date: Mar 2022
169+
Contact: SeongJae Park <[email protected]>
170+
Description: Writing to and reading from this file sets and gets the maximum
171+
'age' of the scheme's target regions.
172+
173+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms
174+
Date: Mar 2022
175+
Contact: SeongJae Park <[email protected]>
176+
Description: Writing to and reading from this file sets and gets the time
177+
quota of the scheme in milliseconds.
178+
179+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes
180+
Date: Mar 2022
181+
Contact: SeongJae Park <[email protected]>
182+
Description: Writing to and reading from this file sets and gets the size
183+
quota of the scheme in bytes.
184+
185+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms
186+
Date: Mar 2022
187+
Contact: SeongJae Park <[email protected]>
188+
Description: Writing to and reading from this file sets and gets the quotas
189+
charge reset interval of the scheme in milliseconds.
190+
191+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil
192+
Date: Mar 2022
193+
Contact: SeongJae Park <[email protected]>
194+
Description: Writing to and reading from this file sets and gets the
195+
under-quota limit regions prioritization weight for 'size' in
196+
permil.
197+
198+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil
199+
Date: Mar 2022
200+
Contact: SeongJae Park <[email protected]>
201+
Description: Writing to and reading from this file sets and gets the
202+
under-quota limit regions prioritization weight for
203+
'nr_accesses' in permil.
204+
205+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil
206+
Date: Mar 2022
207+
Contact: SeongJae Park <[email protected]>
208+
Description: Writing to and reading from this file sets and gets the
209+
under-quota limit regions prioritization weight for 'age' in
210+
permil.
211+
212+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric
213+
Date: Mar 2022
214+
Contact: SeongJae Park <[email protected]>
215+
Description: Writing to and reading from this file sets and gets the metric
216+
of the watermarks for the scheme. The writable/readable
217+
keywords for this file are 'none' for disabling the watermarks
218+
feature, or 'free_mem_rate' for the system's global free memory
219+
rate in permil.
220+
221+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us
222+
Date: Mar 2022
223+
Contact: SeongJae Park <[email protected]>
224+
Description: Writing to and reading from this file sets and gets the metric
225+
check interval of the watermarks for the scheme in
226+
microseconds.
227+
228+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high
229+
Date: Mar 2022
230+
Contact: SeongJae Park <[email protected]>
231+
Description: Writing to and reading from this file sets and gets the high
232+
watermark of the scheme in permil.
233+
234+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid
235+
Date: Mar 2022
236+
Contact: SeongJae Park <[email protected]>
237+
Description: Writing to and reading from this file sets and gets the mid
238+
watermark of the scheme in permil.
239+
240+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low
241+
Date: Mar 2022
242+
Contact: SeongJae Park <[email protected]>
243+
Description: Writing to and reading from this file sets and gets the low
244+
watermark of the scheme in permil.
245+
246+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried
247+
Date: Mar 2022
248+
Contact: SeongJae Park <[email protected]>
249+
Description: Reading this file returns the number of regions that the action
250+
of the scheme has tried to be applied.
251+
252+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried
253+
Date: Mar 2022
254+
Contact: SeongJae Park <[email protected]>
255+
Description: Reading this file returns the total size of regions that the
256+
action of the scheme has tried to be applied in bytes.
257+
258+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied
259+
Date: Mar 2022
260+
Contact: SeongJae Park <[email protected]>
261+
Description: Reading this file returns the number of regions that the action
262+
of the scheme has successfully applied.
263+
264+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied
265+
Date: Mar 2022
266+
Contact: SeongJae Park <[email protected]>
267+
Description: Reading this file returns the total size of regions that the
268+
action of the scheme has successfully applied in bytes.
269+
270+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds
271+
Date: Mar 2022
272+
Contact: SeongJae Park <[email protected]>
273+
Description: Reading this file returns the number of the exceed events of
274+
the scheme's quotas.

Documentation/admin-guide/cgroup-v1/memory.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Brief summary of control files.
6464
threads
6565
cgroup.procs show list of processes
6666
cgroup.event_control an interface for event_fd()
67+
This knob is not available on CONFIG_PREEMPT_RT systems.
6768
memory.usage_in_bytes show current usage for memory
6869
(See 5.5 for details)
6970
memory.memsw.usage_in_bytes show current usage for memory+Swap
@@ -75,6 +76,7 @@ Brief summary of control files.
7576
memory.max_usage_in_bytes show max memory usage recorded
7677
memory.memsw.max_usage_in_bytes show max memory+Swap usage recorded
7778
memory.soft_limit_in_bytes set/show soft limit of memory usage
79+
This knob is not available on CONFIG_PREEMPT_RT systems.
7880
memory.stat show various statistics
7981
memory.use_hierarchy set/show hierarchical account enabled
8082
This knob is deprecated and shouldn't be

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,11 @@ PAGE_SIZE multiple when read back.
13011301
Amount of memory used to cache filesystem data,
13021302
including tmpfs and shared memory.
13031303

1304+
kernel (npn)
1305+
Amount of total kernel memory, including
1306+
(kernel_stack, pagetables, percpu, vmalloc, slab) in
1307+
addition to other kernel memory use cases.
1308+
13041309
kernel_stack
13051310
Amount of memory allocated to kernel stacks.
13061311

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@
16491649
[KNL] Reguires CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
16501650
enabled.
16511651
Allows heavy hugetlb users to free up some more
1652-
memory (6 * PAGE_SIZE for each 2MB hugetlb page).
1652+
memory (7 * PAGE_SIZE for each 2MB hugetlb page).
16531653
Format: { on | off (default) }
16541654

16551655
on: enable the feature

0 commit comments

Comments
 (0)