Skip to content

Commit

Permalink
sched: wakeup-buddy tasks are cache-hot
Browse files Browse the repository at this point in the history
Wakeup-buddy tasks are cache-hot - this makes it a bit harder
for the load-balancer to tear them apart. (but it's still possible,
if the load is sufficiently assymetric)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Mar 19, 2008
1 parent 4ae7d5c commit f540a60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,12 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
{
s64 delta;

/*
* Buddy candidates are cache hot:
*/
if (&p->se == cfs_rq_of(&p->se)->next)
return 1;

if (p->sched_class != &fair_sched_class)
return 0;

Expand Down

0 comments on commit f540a60

Please sign in to comment.