summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenghui Yu (Huawei) <zenghui.yu@linux.dev>2026-09-28 01:39:55 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-10-14 17:20:09 -0700
commitbdb30cd477dac202f0b0c91c4e51d777840dac93 (patch)
tree887bfb083ad72e6efd2dc1be98589145532608cf
parentf33bf97c310e7c6b84553e7b478e2a7aca5911bc (diff)
downloadlinux-next-bdb30cd477dac202f0b0c91c4e51d777840dac93.tar.gz
linux-next-bdb30cd477dac202f0b0c91c4e51d777840dac93.zip
mm/damon/api: remove unused NR_DAMOS_* enumerators
Patch series "mm/damon/core: cleanup code, reduce stack usage, and add kunit". Three various improvements. Patch 1 from Zenghui Yu (Huawei) cleans up unused enums. Patch 2 from Arnd Bergmann reduces kdamond's stack usage. Patch 3 from Karl Mehltretter adds a kunit test for uninitialized PSI quota goal stage logic. This patch (of 3): NR_DAMOS_ACTIONS, NR_DAMOS_QUOTA_GOAL_METRICS, and NR_DAMOS_WMARK_METRICS are not referenced by any code. Remove them. They can be reintroduced if a real user comes up. Link: https://lore.kernel.org/20260928083959.4030-1-sj@kernel.org Link: https://lore.kernel.org/20260928083959.4030-2-sj@kernel.org Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev> Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: SJ Park <sj@kernel.org>
-rw-r--r--include/linux/damon.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 844b175120f0..6a29dc2ac8db 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -117,7 +117,6 @@ struct damon_target {
* @DAMOS_MIGRATE_HOT: Migrate the regions prioritizing warmer regions.
* @DAMOS_MIGRATE_COLD: Migrate the regions prioritizing colder regions.
* @DAMOS_STAT: Do nothing but count the stat.
- * @NR_DAMOS_ACTIONS: Total number of DAMOS actions
*
* The support of each action is up to running &struct damon_operations.
* Refer to 'Operation Action' section of Documentation/mm/damon/design.rst for
@@ -137,7 +136,6 @@ enum damos_action {
DAMOS_MIGRATE_HOT,
DAMOS_MIGRATE_COLD,
DAMOS_STAT, /* Do nothing but only record the stat */
- NR_DAMOS_ACTIONS,
};
/**
@@ -154,9 +152,6 @@ enum damos_action {
* @DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP: Scheme-eligible memory ratio of a
* node in basis points (0-10000).
* @DAMOS_QUOTA_HUGEPAGE_MEM_BP: Huge page to total used memory ratio.
- * @NR_DAMOS_QUOTA_GOAL_METRICS: Number of DAMOS quota goal metrics.
- *
- * Metrics equal to larger than @NR_DAMOS_QUOTA_GOAL_METRICS are unsupported.
*/
enum damos_quota_goal_metric {
DAMOS_QUOTA_USER_INPUT,
@@ -169,7 +164,6 @@ enum damos_quota_goal_metric {
DAMOS_QUOTA_INACTIVE_MEM_BP,
DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP,
DAMOS_QUOTA_HUGEPAGE_MEM_BP,
- NR_DAMOS_QUOTA_GOAL_METRICS,
};
/**
@@ -313,12 +307,10 @@ struct damos_quota {
*
* @DAMOS_WMARK_NONE: Ignore the watermarks of the given scheme.
* @DAMOS_WMARK_FREE_MEM_RATE: Free memory rate of the system in [0,1000].
- * @NR_DAMOS_WMARK_METRICS: Total number of DAMOS watermark metrics
*/
enum damos_wmark_metric {
DAMOS_WMARK_NONE,
DAMOS_WMARK_FREE_MEM_RATE,
- NR_DAMOS_WMARK_METRICS,
};
/**