[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211201150440.1088-2-sj@kernel.org>
Date: Wed, 1 Dec 2021 15:04:30 +0000
From: SeongJae Park <sj@...nel.org>
To: akpm@...ux-foundation.org
Cc: shuah@...nel.org, brendanhiggins@...gle.com, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
SeongJae Park <sj@...nel.org>
Subject: [PATCH 01/11] mm/damon/core: Use better timer mechanisms selection threshold
DAMON is using hrtimer if requested sleep time is <=100ms, while the
suggested threshold[1] is <=20ms. This commit applies the threshold.
[1] Documentation/timers/timers-howto.rst
Fixes: ee801b7dd7822 ("mm/damon/schemes: activate schemes based on a watermarks mechanism")
Signed-off-by: SeongJae Park <sj@...nel.org>
---
mm/damon/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 8cd8fddc931e..ccc62479549a 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -978,7 +978,8 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme)
static void kdamond_usleep(unsigned long usecs)
{
- if (usecs > 100 * 1000)
+ /* See Documentation/timers/timers-howto.rst for the thresholds */
+ if (usecs > 20 * USEC_PER_MSEC)
schedule_timeout_idle(usecs_to_jiffies(usecs));
else
usleep_idle_range(usecs, usecs + 1);
--
2.17.1
Powered by blists - more mailing lists