The patch titled Subject: mm/damon/dbgfs: support quotas of schemes has been added to the -mm tree. Its filename is mm-damon-dbgfs-support-quotas-of-schemes.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-dbgfs-support-quotas-of-schemes.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-dbgfs-support-quotas-of-schemes.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: SeongJae Park <sj@xxxxxxxxxx> Subject: mm/damon/dbgfs: support quotas of schemes This commit makes the debugfs interface of DAMON support the scheme quotas by chaning the format of the input for the schemes file. Link: https://lkml.kernel.org/r/20211019150731.16699-6-sj@xxxxxxxxxx Signed-off-by: SeongJae Park <sj@xxxxxxxxxx> Cc: Amit Shah <amit@xxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: David Woodhouse <dwmw@xxxxxxxxxx> Cc: Greg Thelen <gthelen@xxxxxxxxxx> Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Leonard Foerster <foersleo@xxxxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Cc: Markus Boehme <markubo@xxxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/damon/dbgfs.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) --- a/mm/damon/dbgfs.c~mm-damon-dbgfs-support-quotas-of-schemes +++ a/mm/damon/dbgfs.c @@ -105,11 +105,14 @@ static ssize_t sprint_schemes(struct dam damon_for_each_scheme(s, c) { rc = scnprintf(&buf[written], len - written, - "%lu %lu %u %u %u %u %d %lu %lu\n", + "%lu %lu %u %u %u %u %d %lu %lu %lu %lu %lu\n", s->min_sz_region, s->max_sz_region, s->min_nr_accesses, s->max_nr_accesses, s->min_age_region, s->max_age_region, - s->action, s->stat_count, s->stat_sz); + s->action, + s->quota.ms, s->quota.sz, + s->quota.reset_interval, + s->stat_count, s->stat_sz); if (!rc) return -ENOMEM; @@ -190,10 +193,11 @@ static struct damos **str_to_schemes(con while (pos < len && *nr_schemes < max_nr_schemes) { struct damos_quota quota = {}; - ret = sscanf(&str[pos], "%lu %lu %u %u %u %u %u%n", + ret = sscanf(&str[pos], "%lu %lu %u %u %u %u %u %lu %lu %lu%n", &min_sz, &max_sz, &min_nr_a, &max_nr_a, - &min_age, &max_age, &action, &parsed); - if (ret != 7) + &min_age, &max_age, &action, "a.ms, + "a.sz, "a.reset_interval, &parsed); + if (ret != 10) break; if (!damos_action_valid(action)) { pr_err("wrong action %d\n", action); _ Patches currently in -mm which might be from sj@xxxxxxxxxx are maintainers-update-seongjaes-email-address.patch mm-damon-core-print-kdamond-start-log-in-debug-mode-only.patch mm-damon-core-account-age-of-target-regions.patch mm-damon-core-implement-damon-based-operation-schemes-damos.patch mm-damon-vaddr-support-damon-based-operation-schemes.patch mm-damon-dbgfs-support-damon-based-operation-schemes.patch mm-damon-schemes-implement-statistics-feature.patch selftests-damon-add-schemes-debugfs-tests.patch docs-admin-guide-mm-damon-document-damon-based-operation-schemes.patch mm-damon-dbgfs-allow-users-to-set-initial-monitoring-target-regions.patch mm-damon-dbgfs-test-add-a-unit-test-case-for-init_regions.patch docs-admin-guide-mm-damon-document-init_regions-feature.patch mm-damon-vaddr-separate-commonly-usable-functions.patch mm-damon-vaddr-separate-commonly-usable-functions-fix.patch mm-damon-implement-primitives-for-physical-address-space-monitoring.patch mm-damon-dbgfs-support-physical-memory-monitoring.patch docs-damon-document-physical-memory-monitoring-support.patch mm-damon-paddr-support-the-pageout-scheme.patch mm-damon-schemes-implement-size-quota-for-schemes-application-speed-control.patch mm-damon-schemes-skip-already-charged-targets-and-regions.patch mm-damon-schemes-implement-time-quota.patch mm-damon-dbgfs-support-quotas-of-schemes.patch mm-damon-selftests-support-schemes-quotas.patch mm-damon-schemes-prioritize-regions-within-the-quotas.patch mm-damon-vaddrpaddr-support-pageout-prioritization.patch mm-damon-dbgfs-support-prioritization-weights.patch tools-selftests-damon-update-for-regions-prioritization-of-schemes.patch mm-damon-schemes-activate-schemes-based-on-a-watermarks-mechanism.patch mm-damon-dbgfs-support-watermarks.patch selftests-damon-support-watermarks.patch mm-damon-introduce-damon-based-reclamation-damon_reclaim.patch documentation-admin-guide-mm-damon-add-a-document-for-damon_reclaim.patch