diff options
author | Changbin Du <changbin.du@gmail.com> | 2021-11-05 21:48:22 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-06 21:30:46 +0100 |
commit | 0f91d13366a402420bf98eaaf393db03946c13e0 (patch) | |
tree | bc10841661e60314e68754fbda0ffb41353509c4 /include | |
parent | Docs/admin-guide/mm/pagemap: wordsmith page flags descriptions (diff) | |
download | linux-0f91d13366a402420bf98eaaf393db03946c13e0.tar.xz linux-0f91d13366a402420bf98eaaf393db03946c13e0.zip |
mm/damon: simplify stop mechanism
A kernel thread can exit gracefully with kthread_stop(). So we don't
need a new flag 'kdamond_stop'. And to make sure the task struct is not
freed when accessing it, get reference to it before termination.
Link: https://lkml.kernel.org/r/20211027130517.4404-1-changbin.du@gmail.com
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/damon.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h index fa7f32614b65..321de9d72360 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -381,7 +381,6 @@ struct damon_ctx { /* public: */ struct task_struct *kdamond; - bool kdamond_stop; struct mutex kdamond_lock; struct damon_primitive primitive; |