summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-09-11 06:55:04 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-10-08 22:55:09 -0700
commit283b3d31ec7a62bf4517fc57d07d8faf2bdbc841 (patch)
tree4722bca08222201de9896a50ce9d93c1a895e716 /include
parent724468135d75874f14d1f66ab4d330de636170e6 (diff)
downloadlinux-next-283b3d31ec7a62bf4517fc57d07d8faf2bdbc841.tar.gz
linux-next-283b3d31ec7a62bf4517fc57d07d8faf2bdbc841.zip
mm/damon/core: extend probe_hits_wsum() for moving sum based calculation
damon_probe_hits_wsum() is being called only in aggregation time. In future, it could also be used by DAMOS. In this case, since DAMOS uses its own apply_interval, it could be called in sampling time. Then using the not yet fully aggregated probe_hits could result in suboptimum outcomes. Extend damon_probe_hits_wsum() to get the weighted sum based on moving sum to prepare the DAMOS usage. Link: https://lore.kernel.org/20260911135510.96914-3-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: David Hildenbrand <david@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/damon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h
index e27ed156e765..4be7d1df8e71 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -1075,7 +1075,7 @@ unsigned int damon_nr_accesses_mvsum(struct damon_region *r,
struct damon_ctx *ctx);
unsigned char damon_probe_hits_mvsum(int probe_idx, struct damon_region *r,
struct damon_ctx *ctx);
-unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last,
+unsigned int damon_probe_hits_wsum(struct damon_region *r, bool last, bool mv,
struct damon_ctx *ctx);
int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges,