diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d835061a9bd2..5457c8001c2a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4230,7 +4230,12 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) /* sleeps up to a single latency don't count. */ if (!initial) { - unsigned long thresh = sysctl_sched_latency; + unsigned long thresh; + + if (se_is_idle(se)) + thresh = sysctl_sched_min_granularity; + else + thresh = sysctl_sched_latency; /* * Halve their sleep time's effect, to allow