mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
mm/damon/core: destroy targets when kdamond_fn() finish
When kdamond_fn() completes, the targets are kept. Those are kept to let callers do additional cleanups if they need. There are no such additional cleanups though. DAMON sysfs interface deallocates those in before_terminate() callback, to reduce unnecessary memory usage, for [f]vaddr use case. Just destroy the targets for every case in the core layer. This saves more memory and simplifies the logic. Link: https://lkml.kernel.org/r/20250712195016.151108-13-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
f59ae147ab
commit
3a69f16357
1 changed files with 1 additions and 0 deletions
|
|
@ -2657,6 +2657,7 @@ done:
|
|||
running_exclusive_ctxs = false;
|
||||
mutex_unlock(&damon_lock);
|
||||
|
||||
damon_destroy_targets(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue