]> git.baikalelectronics.ru Git - kernel.git/commit
mm/damon/reclaim: make 'enabled' checking timer simpler
authorSeongJae Park <sj@kernel.org>
Mon, 6 Jun 2022 18:23:09 +0000 (18:23 +0000)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:38 +0000 (18:08 -0700)
commitb804b7022fdb1ca4a00ad4319863ee239e53c423
treee2d369ec9a50641bb80cab373990c0bc0ca554f1
parent8fd4d19f5523fc81379009e6ba5dc58f133555c1
mm/damon/reclaim: make 'enabled' checking timer simpler

DAMON_RECLAIM's 'enabled' parameter store callback ('enabled_store()')
schedules the parameter check timer ('damon_reclaim_timer') if the
parameter is set as 'Y'.  Then, the timer schedules itself to check if
user has set the parameter as 'N'.  It's unnecessarily complex.

This commit makes it simpler by making the parameter store callback to
schedule the timer regardless of the parameter value and disabling the
timer's self scheduling.

Link: https://lkml.kernel.org/r/20220606182310.48781-6-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/reclaim.c