Skip to contentSkip to conversation

sched: minor fast-path overhead reduction

patchlet Applied Mike Galbraith 2 participants 2 messages Oct 17, 2008

lore
Share & tools
lore
#0 lore raw

Greetings,

103638d added a bit of avoidable overhead to the fast-path.

Use sysctl_sched_min_granularity instead of sched_slice() to restrict buddy wakeups.

kernel/sched_fair.c +1 -1
index 18fd171..6708493 100644
@@ -747,7 +747,7 @@ pick_next(struct cfs_rq *cfs_rq, struct sched_entity *se)
 	struct rq *rq = rq_of(cfs_rq);
 	u64 pair_slice = rq->clock - cfs_rq->pair_start;
 
-	if (!cfs_rq->next || pair_slice > sched_slice(cfs_rq, cfs_rq->next)) {
+	if (!cfs_rq->next || pair_slice > sysctl_sched_min_granularity) {
 		cfs_rq->pair_start = rq->clock;
 		return se;
 	}
Applied
#1 lore raw
Quoted 7 lines · Mike Galbraith

Greetings,

103638d added a bit of avoidable overhead to the fast-path.

Use sysctl_sched_min_granularity instead of sched_slice() to restrict buddy wakeups.

applied to tip/sched/urgent, thanks Mike!

Ingo