]> 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)
commit715e062b30eb0fc25f5f775acf59e9ee9424dc7f
treee2d369ec9a50641bb80cab373990c0bc0ca554f1
parent2cea51196fda5f00a0ed60441bb508f1a6d48bd9
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