Files
linux/kernel
SeongJae Park 856b276105 BACKPORT: 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>

(cherry picked from commit e4779015fd)

Bug: 228223814
Signed-off-by: Hailong Tu <tuhailong@oppo.com>
Change-Id: Ie590ba5fcff22c981d0a7ecae6d8e551160136f3
2022-04-22 15:19:36 -07:00
..
2022-02-16 15:14:37 +01:00
2021-04-14 08:41:58 +02:00
2022-02-16 15:14:37 +01:00
2021-11-12 15:11:32 +01:00
2022-03-18 12:17:14 +01:00
2021-12-01 09:37:11 +01:00
2021-09-08 09:07:16 +02:00
2020-08-12 10:58:02 -07:00
2019-05-24 20:16:01 +02:00
2021-09-03 10:59:15 +02:00
2022-02-23 12:26:12 +01:00
2020-11-14 11:26:04 -08:00
2021-01-13 10:28:55 +01:00
2020-07-27 14:31:12 -04:00
2021-08-18 09:34:44 +02:00
2021-11-19 07:47:18 +01:00
2021-09-03 10:59:15 +02:00
2020-05-09 13:57:12 +02:00
2021-05-20 15:35:25 +02:00