linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/fair: avoid vruntime compensation for SCHED_IDLE task
@ 2020-08-20 12:00 Jiang Biao
  2020-08-20 12:51 ` Vincent Guittot
  2020-08-21  0:37 ` [sched/fair] 88d13f778f: WARNING:at_kernel/sched/fair.c:#place_entity kernel test robot
  0 siblings, 2 replies; 15+ messages in thread
From: Jiang Biao @ 2020-08-20 12:00 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, linux-kernel, Jiang Biao

From: Jiang Biao <benbjiang@tencent.com>

Vruntime compensation has been down in place_entity() to
boot the waking procedure for fair tasks. There is no need to
do that for SCHED_IDLE task actually.

Not compensating vruntime for SCHED_IDLE task could make
SCHED_IDLE task more harmless for normal tasks.

Signed-off-by: Jiang Biao <benbjiang@tencent.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1a68a0536add..adff77676a0a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4115,7 +4115,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 		vruntime += sched_vslice(cfs_rq, se);
 
 	/* sleeps up to a single latency don't count. */
-	if (!initial) {
+	if (!initial && likely(!task_has_idle_policy(task_of(se)))) {
 		unsigned long thresh = sysctl_sched_latency;
 
 		/*
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-09-01 14:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 12:00 [PATCH] sched/fair: avoid vruntime compensation for SCHED_IDLE task Jiang Biao
2020-08-20 12:51 ` Vincent Guittot
2020-08-20 12:58   ` peterz
2020-08-20 13:15     ` Vincent Guittot
2020-08-20 13:43       ` peterz
2020-08-20 14:09         ` Vincent Guittot
2020-08-20 14:24           ` Jiang Biao
2020-08-23  7:33           ` Jiang Biao
2020-08-28 12:55             ` Vincent Guittot
2020-09-01 10:14               ` Jiang Biao
2020-09-01 13:04                 ` Vincent Guittot
2020-09-01 14:19                   ` Jiang Biao
2020-08-20 14:19     ` Jiang Biao
2020-08-20 14:15   ` Jiang Biao
2020-08-21  0:37 ` [sched/fair] 88d13f778f: WARNING:at_kernel/sched/fair.c:#place_entity kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).