]> www.infradead.org Git - users/jedix/linux-maple.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)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:02 +0000 (20:15 -0400)
commitc156793803ea06d22c3619bc0592c575f2967356
tree41b3955de3d3cb55b32a872cd5f1445514bc0596
parent0257c58c155fd911b76e6c715fd42176310ab14f
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