Commit 99418349 authored by SeongJae Park's avatar SeongJae Park Committed by Suren Baghdasaryan
Browse files

UPSTREAM: mm/damon/vaddr: call damon_update_region_access_rate() always

When getting mm_struct of the monitoring target process fails, there wil
be no need to increase the access rate counter (nr_accesses) of the
regions for the process.  Hence, damon_va_check_accesses() skips calling
damon_update_region_access_rate() in the case.  This breaks the assumption
that damon_update_region_access_rate() is called for every region, for
every sampling interval.  Call the function for every region even in the
case.  This might increase the overhead in some cases, but such case would
not be frequent, so no significant impact is really expected.

Link: https://lkml.kernel.org/r/20230915025251.72816-3-sj@kernel.org


Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 22a77880)

Bug:407463672

Change-Id: I52f9ea383852ef99b6a5b94637c6681ff42a7585
Signed-off-by: default avatardaiyang5 <daiyang5@xiaomi.com>
parent 6c3ca340
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment