Skip to content

Commit 505326e

Browse files
committed
Merge branch 'master' of https://github.com/torvalds/linux
2 parents 43feb5b + 416f99c commit 505326e

File tree

1,897 files changed

+93147
-22259
lines changed

Some content is hidden

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

1,897 files changed

+93147
-22259
lines changed

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ ForEachMacros:
140140
- 'damon_for_each_scheme_safe'
141141
- 'damon_for_each_target'
142142
- 'damon_for_each_target_safe'
143-
- 'damos_for_each_filter'
144-
- 'damos_for_each_filter_safe'
143+
- 'damos_for_each_core_filter'
144+
- 'damos_for_each_core_filter_safe'
145145
- 'damos_for_each_ops_filter'
146146
- 'damos_for_each_ops_filter_safe'
147147
- 'damos_for_each_quota_goal'

.mailmap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ Christian Brauner <brauner@kernel.org> <christian@brauner.io>
186186
Christian Brauner <brauner@kernel.org> <christian.brauner@canonical.com>
187187
Christian Brauner <brauner@kernel.org> <christian.brauner@ubuntu.com>
188188
Christian Marangi <ansuelsmth@gmail.com>
189+
Christophe Leroy <chleroy@kernel.org> <christophe.leroy@c-s.fr>
190+
Christophe Leroy <chleroy@kernel.org> <christophe.leroy@csgroup.eu>
191+
Christophe Leroy <chleroy@kernel.org> <christophe.leroy2@cs-soprasteria.com>
189192
Christophe Ricard <christophe.ricard@gmail.com>
190193
Christopher Obbard <christopher.obbard@linaro.org> <chris.obbard@collabora.com>
191194
Christoph Hellwig <hch@lst.de>

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,17 @@ Description:
764764
participate in load balancing. These CPUs are set by
765765
boot parameter "isolcpus=".
766766

767+
What: /sys/devices/system/cpu/housekeeping
768+
Date: Oct 2025
769+
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
770+
Description:
771+
(RO) the list of logical CPUs that are designated by the kernel as
772+
"housekeeping". Each CPU are responsible for handling essential
773+
system-wide background tasks, including RCU callbacks, delayed
774+
timer callbacks, and unbound workqueues, minimizing scheduling
775+
jitter on low-latency, isolated CPUs. These CPUs are set when boot
776+
parameter "isolcpus=nohz" or "nohz_full=" is specified.
777+
767778
What: /sys/devices/system/cpu/crash_hotplug
768779
Date: Aug 2023
769780
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ Description: Writing to and reading from this file sets and gets the pid of
164164
the target process if the context is for virtual address spaces
165165
monitoring, respectively.
166166

167+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/obsolete_target
168+
Date: Oct 2025
169+
Contact: SeongJae Park <sj@kernel.org>
170+
Description: Writing to and reading from this file sets and gets the
171+
obsoleteness of the matching parameters commit destination
172+
target.
173+
167174
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions
168175
Date: Mar 2022
169176
Contact: SeongJae Park <sj@kernel.org>
@@ -303,6 +310,12 @@ Contact: SeongJae Park <sj@kernel.org>
303310
Description: Writing to and reading from this file sets and gets the nid
304311
parameter of the goal.
305312

313+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/path
314+
Date: Oct 2025
315+
Contact: SeongJae Park <sj@kernel.org>
316+
Description: Writing to and reading from this file sets and gets the path
317+
parameter of the goal.
318+
306319
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil
307320
Date: Mar 2022
308321
Contact: SeongJae Park <sj@kernel.org>

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,10 @@ The following nested keys are defined.
15131513
oom_group_kill
15141514
The number of times a group OOM has occurred.
15151515

1516+
sock_throttled
1517+
The number of times network sockets associated with
1518+
this cgroup are throttled.
1519+
15161520
memory.events.local
15171521
Similar to memory.events but the fields in the file are local
15181522
to the cgroup i.e. not hierarchical. The file modified event

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ Kernel parameters
11111111
It will be ignored when crashkernel=X,high is not used
11121112
or memory reserved is below 4G.
11131113
crashkernel=size[KMG],cma
1114-
[KNL, X86] Reserve additional crash kernel memory from
1114+
[KNL, X86, ppc] Reserve additional crash kernel memory from
11151115
CMA. This reservation is usable by the first system's
11161116
userspace memory and kernel movable allocations (memory
11171117
balloon, zswap). Pages allocated from this memory range
@@ -1211,12 +1211,8 @@ Kernel parameters
12111211

12121212
debugfs= [KNL,EARLY] This parameter enables what is exposed to
12131213
userspace and debugfs internal clients.
1214-
Format: { on, no-mount, off }
1214+
Format: { on, off }
12151215
on: All functions are enabled.
1216-
no-mount:
1217-
Filesystem is not registered but kernel clients can
1218-
access APIs and a crashkernel can be used to read
1219-
its content. There is nothing to mount.
12201216
off: Filesystem is not registered and clients
12211217
get a -EPERM as result when trying to register files
12221218
or directories within debugfs.
@@ -7304,6 +7300,9 @@ Kernel parameters
73047300
them frequently to increase the rate of SLB faults
73057301
on kernel addresses.
73067302

7303+
no_slb_preload [PPC,EARLY]
7304+
Disables slb preloading for userspace.
7305+
73077306
sunrpc.min_resvport=
73087307
sunrpc.max_resvport=
73097308
[NFS,SUNRPC]

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,28 @@ End of target memory region in physical address.
211211
The end physical address of memory region that DAMON_LRU_SORT will do work
212212
against. By default, biggest System RAM is used as the region.
213213

214+
addr_unit
215+
---------
216+
217+
A scale factor for memory addresses and bytes.
218+
219+
This parameter is for setting and getting the :ref:`address unit
220+
<damon_design_addr_unit>` parameter of the DAMON instance for DAMON_RECLAIM.
221+
222+
``monitor_region_start`` and ``monitor_region_end`` should be provided in this
223+
unit. For example, let's suppose ``addr_unit``, ``monitor_region_start`` and
224+
``monitor_region_end`` are set as ``1024``, ``0`` and ``10``, respectively.
225+
Then DAMON_LRU_SORT will work for 10 KiB length of physical address range that
226+
starts from address zero (``[0 * 1024, 10 * 1024)`` in bytes).
227+
228+
Stat parameters having ``bytes_`` prefix are also in this unit. For example,
229+
let's suppose values of ``addr_unit``, ``bytes_lru_sort_tried_hot_regions`` and
230+
``bytes_lru_sorted_hot_regions`` are ``1024``, ``42``, and ``32``,
231+
respectively. Then it means DAMON_LRU_SORT tried to LRU-sort 42 KiB of hot
232+
memory and successfully LRU-sorted 32 KiB of the memory in total.
233+
234+
If unsure, use only the default value (``1``) and forget about this.
235+
214236
kdamond_pid
215237
-----------
216238

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,28 @@ The end physical address of memory region that DAMON_RECLAIM will do work
232232
against. That is, DAMON_RECLAIM will find cold memory regions in this region
233233
and reclaims. By default, biggest System RAM is used as the region.
234234

235+
addr_unit
236+
---------
237+
238+
A scale factor for memory addresses and bytes.
239+
240+
This parameter is for setting and getting the :ref:`address unit
241+
<damon_design_addr_unit>` parameter of the DAMON instance for DAMON_RECLAIM.
242+
243+
``monitor_region_start`` and ``monitor_region_end`` should be provided in this
244+
unit. For example, let's suppose ``addr_unit``, ``monitor_region_start`` and
245+
``monitor_region_end`` are set as ``1024``, ``0`` and ``10``, respectively.
246+
Then DAMON_RECLAIM will work for 10 KiB length of physical address range that
247+
starts from address zero (``[0 * 1024, 10 * 1024)`` in bytes).
248+
249+
``bytes_reclaim_tried_regions`` and ``bytes_reclaimed_regions`` are also in
250+
this unit. For example, let's suppose values of ``addr_unit``,
251+
``bytes_reclaim_tried_regions`` and ``bytes_reclaimed_regions`` are ``1024``,
252+
``42``, and ``32``, respectively. Then it means DAMON_RECLAIM tried to reclaim
253+
42 KiB memory and successfully reclaimed 32 KiB memory in total.
254+
255+
If unsure, use only the default value (``1``) and forget about this.
256+
235257
skip_anon
236258
---------
237259

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

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ on the system's entire physical memory using DAMON, and provides simplified
1010
access monitoring results statistics, namely idle time percentiles and
1111
estimated memory bandwidth.
1212

13+
.. _damon_stat_monitoring_accuracy_overhead:
14+
1315
Monitoring Accuracy and Overhead
1416
================================
1517

1618
DAMON_STAT uses monitoring intervals :ref:`auto-tuning
1719
<damon_design_monitoring_intervals_autotuning>` to make its accuracy high and
1820
overhead minimum. It auto-tunes the intervals aiming 4 % of observable access
1921
events to be captured in each snapshot, while limiting the resulting sampling
20-
events to be 5 milliseconds in minimum and 10 seconds in maximum. On a few
22+
interval to be 5 milliseconds in minimum and 10 seconds in maximum. On a few
2123
production server systems, it resulted in consuming only 0.x % single CPU time,
22-
while capturing reasonable quality of access patterns.
24+
while capturing reasonable quality of access patterns. The tuning-resulting
25+
intervals can be retrieved via ``aggr_interval_us`` :ref:`parameter
26+
<damon_stat_aggr_interval_us>`.
2327

2428
Interface: Module Parameters
2529
============================
@@ -41,6 +45,18 @@ You can enable DAMON_STAT by setting the value of this parameter as ``Y``.
4145
Setting it as ``N`` disables DAMON_STAT. The default value is set by
4246
``CONFIG_DAMON_STAT_ENABLED_DEFAULT`` build config option.
4347

48+
.. _damon_stat_aggr_interval_us:
49+
50+
aggr_interval_us
51+
----------------
52+
53+
Auto-tuned aggregation time interval in microseconds.
54+
55+
Users can read the aggregation interval of DAMON that is being used by the
56+
DAMON instance for DAMON_STAT. It is :ref:`auto-tuned
57+
<damon_stat_monitoring_accuracy_overhead>` and therefore the value is
58+
dynamically changed.
59+
4460
estimated_memory_bandwidth
4561
--------------------------
4662

@@ -58,12 +74,13 @@ memory_idle_ms_percentiles
5874
Per-byte idle time (milliseconds) percentiles of the system.
5975

6076
DAMON_STAT calculates how long each byte of the memory was not accessed until
61-
now (idle time), based on the current DAMON results snapshot. If DAMON found a
62-
region of access frequency (nr_accesses) larger than zero, every byte of the
63-
region gets zero idle time. If a region has zero access frequency
64-
(nr_accesses), how long the region was keeping the zero access frequency (age)
65-
becomes the idle time of every byte of the region. Then, DAMON_STAT exposes
66-
the percentiles of the idle time values via this read-only parameter. Reading
67-
the parameter returns 101 idle time values in milliseconds, separated by comma.
77+
now (idle time), based on the current DAMON results snapshot. For regions
78+
having access frequency (nr_accesses) larger than zero, how long the current
79+
access frequency level was kept multiplied by ``-1`` becomes the idlee time of
80+
every byte of the region. If a region has zero access frequency (nr_accesses),
81+
how long the region was keeping the zero access frequency (age) becomes the
82+
idle time of every byte of the region. Then, DAMON_STAT exposes the
83+
percentiles of the idle time values via this read-only parameter. Reading the
84+
parameter returns 101 idle time values in milliseconds, separated by comma.
6885
Each value represents 0-th, 1st, 2nd, 3rd, ..., 99th and 100th percentile idle
6986
times.

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

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ comma (",").
6767
│ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us
6868
│ │ │ │ │ │ nr_regions/min,max
6969
│ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets
70-
│ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target
70+
│ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target,obsolete_target
7171
│ │ │ │ │ │ │ :ref:`regions <sysfs_regions>`/nr_regions
7272
│ │ │ │ │ │ │ │ :ref:`0 <sysfs_region>`/start,end
7373
│ │ │ │ │ │ │ │ ...
@@ -81,7 +81,7 @@ comma (",").
8181
│ │ │ │ │ │ │ :ref:`quotas <sysfs_quotas>`/ms,bytes,reset_interval_ms,effective_bytes
8282
│ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil
8383
│ │ │ │ │ │ │ │ :ref:`goals <sysfs_schemes_quota_goals>`/nr_goals
84-
│ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value,nid
84+
│ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value,nid,path
8585
│ │ │ │ │ │ │ :ref:`watermarks <sysfs_watermarks>`/metric,interval_us,high,mid,low
8686
│ │ │ │ │ │ │ :ref:`{core_,ops_,}filters <sysfs_filters>`/nr_filters
8787
│ │ │ │ │ │ │ │ 0/type,matching,allow,memcg_path,addr_start,addr_end,target_idx,min,max
@@ -134,7 +134,8 @@ Users can write below commands for the kdamond to the ``state`` file.
134134
- ``on``: Start running.
135135
- ``off``: Stop running.
136136
- ``commit``: Read the user inputs in the sysfs files except ``state`` file
137-
again.
137+
again. Monitoring :ref:`target region <sysfs_regions>` inputs are also be
138+
ignored if no target region is specified.
138139
- ``update_tuned_intervals``: Update the contents of ``sample_us`` and
139140
``aggr_us`` files of the kdamond with the auto-tuning applied ``sampling
140141
interval`` and ``aggregation interval`` for the files. Please refer to
@@ -264,13 +265,20 @@ to ``N-1``. Each directory represents each monitoring target.
264265
targets/<N>/
265266
------------
266267

267-
In each target directory, one file (``pid_target``) and one directory
268-
(``regions``) exist.
268+
In each target directory, two files (``pid_target`` and ``obsolete_target``)
269+
and one directory (``regions``) exist.
269270

270271
If you wrote ``vaddr`` to the ``contexts/<N>/operations``, each target should
271272
be a process. You can specify the process to DAMON by writing the pid of the
272273
process to the ``pid_target`` file.
273274

275+
Users can selectively remove targets in the middle of the targets array by
276+
writing non-zero value to ``obsolete_target`` file and committing it (writing
277+
``commit`` to ``state`` file). DAMON will remove the matching targets from its
278+
internal targets array. Users are responsible to construct target directories
279+
again, so that those correctly represent the changed internal targets array.
280+
281+
274282
.. _sysfs_regions:
275283

276284
targets/<N>/regions
@@ -289,6 +297,11 @@ In the beginning, this directory has only one file, ``nr_regions``. Writing a
289297
number (``N``) to the file creates the number of child directories named ``0``
290298
to ``N-1``. Each directory represents each initial monitoring target region.
291299

300+
If ``nr_regions`` is zero when committing new DAMON parameters online (writing
301+
``commit`` to ``state`` file of :ref:`kdamond <sysfs_kdamond>`), the commit
302+
logic ignores the target regions. In other words, the current monitoring
303+
results for the target are preserved.
304+
292305
.. _sysfs_region:
293306

294307
regions/<N>/
@@ -402,9 +415,9 @@ number (``N``) to the file creates the number of child directories named ``0``
402415
to ``N-1``. Each directory represents each goal and current achievement.
403416
Among the multiple feedback, the best one is used.
404417

405-
Each goal directory contains four files, namely ``target_metric``,
406-
``target_value``, ``current_value`` and ``nid``. Users can set and get the
407-
four parameters for the quota auto-tuning goals that specified on the
418+
Each goal directory contains five files, namely ``target_metric``,
419+
``target_value``, ``current_value`` ``nid`` and ``path``. Users can set and
420+
get the five parameters for the quota auto-tuning goals that specified on the
408421
:ref:`design doc <damon_design_damos_quotas_auto_tuning>` by writing to and
409422
reading from each of the files. Note that users should further write
410423
``commit_schemes_quota_goals`` to the ``state`` file of the :ref:`kdamond

0 commit comments

Comments
 (0)