mm/damon: misc fixups and improvements for 6.18
Subsystems (4)
SeongJae Park
maintainerv2 cover mm/damon: misc fixups and improvements for 6.18
Misc fixes and improvements for DAMON that are not critical and therefore aims to be merged into Linux 6.18-rc1.
The first patch improves DAMON's age counting for nr_accesses zero to/from non-zero changes.
The second patch fixes an initial DAMOS apply interval delay issue that is not realistic but still could happen on an odd setup.
The third and the fourth patches update DAMON community meetup description and DAMON user-space tool example command for DAMOS usage, respectively.
Finally, the fifth patch updates MAINTAINERS section name for DAMON to just DAMON.
Changes from v1
(https://lore.kernel.org/[email protected])
- Separate [1] damon_attrs param_ctx usage as a hotfix patch
- Make nr_accesses reset condition easy to read
- Collect Joshua's Reviewed-by tags
Changes from RFC
(https://lore.kernel.org/[email protected])
- The RFC was only for the first patch
- Rebase and wordsmith the first patch
- Add a few misc fixes and improvements for 6.18 to the series
[1] https://lore.kernel.org/[email protected]
SeongJae Park (5):
mm/damon/core: reset age if nr_accesses changes between non-zero and
zero
mm/damon/core: set effective quota on first charge window Docs/mm/damon/maintainer-profile: update community meetup for
reservation requirements
Docs/admin-guide/mm/damon/start: add --target_pid to DAMOS example
command
MAINTAINERS: rename DAMON section
Documentation/admin-guide/mm/damon/start.rst | 2 +- Documentation/mm/damon/maintainer-profile.rst | 17 ++++++----------- MAINTAINERS | 2 +- mm/damon/core.c | 6 +++++- 4 files changed, 13 insertions(+), 14 deletions(-)
base-commit: 4178fb3b4a5145053746caab556b1c5f5538bf3f
Signature · 1 line
2.39.5
SeongJae Park
maintainerPATCH v2 1/5 mm/damon/core: reset age if nr_accesses changes between non-zero and zero
DAMON resets the age of a region if its nr_accesses value has significantly changed. Specifically, the threshold is calculated as 20% of largest nr_accesses of the current snapshot. This means that regions changing the nr_accesses from zero to small non-zero value or from a small non-zero value to zero will keep the age. Since many users treat zero nr_accesses regions special, this can be confusing. Kernel code including DAMOS' regions priority calculation and DAMON_STAT's idle time calculation also treat zero nr_accesses regions special. Make it unconfusing by resetting the age when the nr_accesses changes between zero and a non-zero value.
--- mm/damon/core.c | 2 ++ 1 file changed, 2 insertions(+)
mm/damon/core.c +2 -0
@@ -2261,6 +2261,8 @@ static void damon_merge_regions_of(struct damon_target *t, unsigned int thres,damon_for_each_region_safe (r, next, t) {if (abs (r->nr_accesses - r->last_nr_accesses) > thres) r->age =0 ; +else if ((r->nr_accesses ==0 ) != (r->last_nr_accesses ==0 )) + r->age =0 ;else r->age++;
Signature · 1 line
2.39.5
SeongJae Park
maintainerPATCH v2 2/5 mm/damon/core: set effective quota on first charge window
In reply to SeongJae ParkThe effective quota of a scheme is initialized zero, which means there is no quota. It is set based on user-specified time/quota/quota goals. But the later value set is done only from the second charge window. As a result, a scheme having a user-specified quota can work as not having the quota (unexpectedly fast) for the first charge window. In practical and common use cases the quota interval is not too long, and the scheme's target access pattern is restrictive. Hence the issue should be modest. That said, it is apparently an unintended misbehavior. Fix the problem by setting esz on the first charge window.
--- mm/damon/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/damon/core.c +3 -1
@@ -2142,8 +2142,10 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)return ;/* First charge window */ -if (!quota->total_charged_sz && !quota->charged_from) +if (!quota->total_charged_sz && !quota->charged_from) { quota->charged_from = jiffies; +damos_set_effective_quota (quota); + }/* New charge window starts */ if (time_after_eq(jiffies, quota->charged_from +
Signature · 1 line
2.39.5
SeongJae Park
maintainerPATCH v2 3/5 Docs/mm/damon/maintainer-profile: update community meetup for reservation requirements
In reply to SeongJae ParkDAMON community meetup was having two different kinds of meetups:
reservation required ones and unrequired ones. Now the reservation unrequested one is gone, but the documentation on the maintainer-profile is not updated. Update.
--- Documentation/mm/damon/maintainer-profile.rst | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
Documentation/mm/damon/maintainer-profile.rst +6 -11
@@ -89,18 +89,13 @@ the maintainer. Community meetup ---------------- -DAMON community is maintaining two bi-weekly meetup series for community -members who prefer synchronous conversations over mails. +DAMON community has a bi-weekly meetup series for members who prefer +synchronous conversations over mails. It is for discussions on specific topics +between a group of members including the maintainer. The maintainer shares the +available time slots, and attendees should reserve one of those at least 24 +hours before the time slot, by reaching out to the maintainer. -The first one is for any discussion between every community member. No -reservation is needed. - -The seconds one is for discussions on specific topics between restricted -members including the maintainer. The maintainer shares the available time -slots, and attendees should reserve one of those at least 24 hours before the -time slot, by reaching out to the maintainer. - -Schedules and available reservation time slots are available at the Google `doc +Schedules and reservation status are available at the Google `doc <https://docs.google.com/document/d/1v43Kcj3ly4CYqmAkMaZzLiM2GEnWfgdGbZAH3mi2vpM/edit?usp=sharing>`_. There is also a public Google `calendar <https://calendar.google.com/calendar/u/0?cid=ZDIwOTA4YTMxNjc2MDQ3NTIyMmUzYTM5ZmQyM2U4NDA0ZGIwZjBiYmJlZGQxNDM0MmY4ZTRjOTE0NjdhZDRiY0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`_
Signature · 1 line
2.39.5
SeongJae Park
maintainerPATCH v2 4/5 Docs/admin-guide/mm/damon/start: add --target_pid to DAMOS example command
In reply to SeongJae ParkThe example command doesn't work [1] on the latest DAMON user-space tool, since --damos_action option is updated to receive multiple arguments, and hence cannot know if the final argument is for deductible monitoring target or an argument for --damos_action option. Add --target_pid option to let damo understand it is for target pid.
[1] https://github.com/damonitor/damo/pull/32
--- Documentation/admin-guide/mm/damon/start.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/start.rst +1 -1
@@ -175,4 +175,4 @@ Below command makes every memory region of size >=4K that has not accessed for $ sudo damo start --damos_access_rate 0 0 --damos_sz_region 4K max \ --damos_age 60s max --damos_action pageout \ - <pid of your workload> + --target_pid <pid of your workload>
Signature · 1 line
2.39.5
SeongJae Park
maintainerPATCH v2 5/5 MAINTAINERS: rename DAMON section
In reply to SeongJae ParkDAMON section name is 'DATA ACCESS MONITOR', which implies it is only for data access monitoring. But DAMON is now evolved for not only access monitoring but also access-aware system operations (DAMOS). Rename the section to simply DAMON. It might make it difficult to understand what it does at a glance, but at least not spreading more confusion. Readers can further refer to the documentation to better understand what really DAMON does.
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -6738,7 +6738,7 @@ S: Maintained W: https://docs.dasharo.com/ F: drivers/platform/x86/dasharo-acpi.c -DATA ACCESS MONITOR +DAMON M: SeongJae Park <[email protected]> L: [email protected] L: [email protected]
Signature · 1 line
2.39.5