SeongJae Park e4779015fd timers: implement usleep_idle_range()
Patch series "mm/damon: Fix fake /proc/loadavg reports", v3.

This patchset fixes DAMON's fake load report issue.  The first patch
makes yet another variant of usleep_range() for this fix, and the second
patch fixes the issue of DAMON by making it using the newly introduced
function.

This patch (of 2):

Some kernel threads such as DAMON could need to repeatedly sleep in
micro seconds level.  Because usleep_range() sleeps in uninterruptible
state, however, such threads would make /proc/loadavg reports fake load.

To help such cases, this commit implements a variant of usleep_range()
called usleep_idle_range().  It is same to usleep_range() but sets the
state of the current task as TASK_IDLE while sleeping.

Link: https://lkml.kernel.org/r/20211126145015.15862-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20211126145015.15862-2-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: John Stultz <john.stultz@linaro.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-12-10 17:10:55 -08:00
..
2021-11-09 10:56:41 -08:00
2021-10-19 17:27:05 +02:00
2021-11-01 20:05:19 -07:00
2021-11-18 10:50:45 -08:00
2021-11-01 20:25:38 -07:00
2021-11-01 21:17:39 -07:00
\n
2021-11-06 16:43:20 -07:00
2021-11-01 21:17:39 -07:00
2021-11-01 21:17:39 -07:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2021-11-09 10:02:51 -08:00
2021-06-18 11:43:08 +02:00
2021-09-08 15:32:34 -07:00
2021-05-07 00:26:33 -07:00
2021-11-01 20:05:19 -07:00
2021-10-14 13:29:18 +02:00
2021-06-18 11:43:09 +02:00
2021-10-07 13:51:11 +02:00
2021-05-07 00:26:34 -07:00