Files
linux/kernel
Quentin Perret 1cdc6a7088 BACKPORT: sched/core: Fix reset-on-fork from RT with uclamp
uclamp_fork() resets the uclamp values to their default when the
reset-on-fork flag is set. It also checks whether the task has a RT
policy, and sets its uclamp.min to 1024 accordingly. However, during
reset-on-fork, the task's policy is lowered to SCHED_NORMAL right after,
hence leading to an erroneous uclamp.min setting for the new task if it
was forked from RT.

Fix this by removing the unnecessary check on rt_task() in
uclamp_fork() as this doesn't make sense if the reset-on-fork flag is
set.

[ qperret: BACKPORT because of a conflict with the Android-specific
  SUGOV_RT_MAX_FREQ sched_feat, which is equally unnecessary in this
  path ]

Bug: 120440300
Fixes: 1a00d99997 ("sched/uclamp: Set default clamps for RT tasks")
Reported-by: Chitti Babu Theegala <ctheegal@codeaurora.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Patrick Bellasi <patrick.bellasi@matbug.net>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lkml.kernel.org/r/20200416085956.217587-1-qperret@google.com
(cherry picked from commit eaf5a92ebd)
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I9a19ac5474d0508b8437e4a1d859573b4106ed08
2020-05-01 07:34:40 +00:00
..
2020-04-29 19:16:15 +02:00
2020-04-03 08:17:23 +02:00
2020-01-27 15:55:44 +01:00
2020-04-29 17:26:17 +02:00
2020-04-29 17:26:17 +02:00
2020-04-18 13:33:51 +02:00
2020-04-24 01:05:45 +00:00
2020-04-29 17:26:17 +02:00
2019-12-13 08:51:11 +01:00
2019-12-01 09:17:17 +01:00
2020-04-29 19:16:15 +02:00
2020-04-18 13:33:51 +02:00
2020-01-27 15:55:44 +01:00
2020-03-25 08:06:14 +01:00
2020-01-15 14:51:23 +00:00
2019-12-01 09:53:43 +01:00
2020-02-24 09:13:25 +01:00
2020-03-25 08:06:13 +01:00
2019-08-12 13:36:37 -04:00
2020-04-18 13:33:51 +02:00
2018-07-03 09:20:44 +02:00
2020-01-09 10:18:59 +01:00
2018-06-07 16:56:28 -04:00
2019-03-06 15:59:21 +00:00