]> Gentwo Git Trees - linux/.git/commit
mm/damon/core: set effective quota on first charge window
authorSeongJae Park <sj@kernel.org>
Tue, 16 Sep 2025 03:23:36 +0000 (20:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:36 +0000 (14:22 -0700)
commitac93e87c66fd30b6cf328591ea0f09321ab98fac
tree879d1aa41108057b1290809cd4788dabfd638a40
parent2a05df14b3ad921ff2fcc6cc535cb153cbf38c87
mm/damon/core: set effective quota on first charge window

The 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.

Link: https://lkml.kernel.org/r/20250916032339.115817-3-sj@kernel.org
Fixes: 1cd243030059 ("mm/damon/schemes: implement time quota") # 5.16.x
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c