[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20231028210930.62947-1-sj@kernel.org>
Date: Sat, 28 Oct 2023 21:09:30 +0000
From: SeongJae Park <sj@...nel.org>
To: SeongJae Park <sj@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, damon@...ts.linux.dev,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH 1/2] mm/damon/sysfs: remove requested targets when online-commit inputs
On Sun, 22 Oct 2023 21:07:33 +0000 SeongJae Park <sj@...nel.org> wrote:
> damon_sysfs_set_targets(), which updates the targets of the context for
> online commitment, do not remove targets that removed from the
> corresponding sysfs files. As a result, more than intended targets of
> the context can exist and hence consume memory and monitoring CPU
> resource more than expected.
>
> Fix it by removing all targets of the context and fill up again using
> the user input. This could cause unnecessary memory dealloc and realloc
> operations, but this is not a hot code path. Also, note that
> damon_target is stateless, and hence no data is lost.
This is not true. 'struct damon_target' contains monitoring results
(regions_list). Hence, this patch makes all monitoring results to be removed
whenever doing online-commit. I was confused with init_regions at the time of
this writing, sorry.
I will send a fix for this soon.
Thanks,
SJ
Powered by blists - more mailing lists