Skip to content

Commit baa4bee

Browse files
Peng WangCruz Zhao
authored andcommitted
anolis: sched: Ensure the logic of check_preempt_tick with CONFIG_GROUP_IDENTITY off
ANBZ: torvalds#471 If we turn CONFIG_GROUP_IDENTITY off, is_highclass() will return false, which will result in that check_preempt_tick() returns immediately, and this is not right. To solved this problem, we just judge whether delta_exec < sysctl_sched_min_granularity if CONFIG_GROUP_IDENTITY is off. Signed-off-by: Peng Wang <[email protected]> Signed-off-by: Cruz Zhao <[email protected]> Signed-off-by: Shile Zhang <[email protected]> Acked-by: Michael Wang <[email protected]>
1 parent 533d409 commit baa4bee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/sched/fair.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5546,7 +5546,11 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
55465546
* narrow margin doesn't have to wait for a full slice.
55475547
* This also mitigates buddy induced latencies under load.
55485548
*/
5549+
#ifdef CONFIG_GROUP_IDENTITY
55495550
if (is_highclass(curr) && delta_exec < sysctl_sched_min_granularity)
5551+
#else
5552+
if (delta_exec < sysctl_sched_min_granularity)
5553+
#endif
55505554
return;
55515555

55525556
/* Must be on expel if no next se, and curr won't be expellee */

0 commit comments

Comments
 (0)