Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8355
b: refs/heads/master
c: fa3b6dd
h: refs/heads/master
i:
  8353: 21449da
  8351: 684e7c4
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed Sep 10, 2005
1 parent 2144656 commit 32ecdd1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5927ad78ec75870b1bdfa65a10ad1300cd664d36
refs/heads/master: fa3b6ddc3f4a8eadba52234134cdb59c28b5332d
15 changes: 14 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,16 @@ static int load_balance(int this_cpu, runqueue_t *this_rq,
if (unlikely(sd->nr_balance_failed > sd->cache_nice_tries+2)) {

spin_lock(&busiest->lock);

/* don't kick the migration_thread, if the curr
* task on busiest cpu can't be moved to this_cpu
*/
if (!cpu_isset(this_cpu, busiest->curr->cpus_allowed)) {
spin_unlock(&busiest->lock);
all_pinned = 1;
goto out_one_pinned;
}

if (!busiest->active_balance) {
busiest->active_balance = 1;
busiest->push_cpu = this_cpu;
Expand Down Expand Up @@ -2165,6 +2175,8 @@ static int load_balance(int this_cpu, runqueue_t *this_rq,
schedstat_inc(sd, lb_balanced[idle]);

sd->nr_balance_failed = 0;

out_one_pinned:
/* tune up the balancing interval */
if ((all_pinned && sd->balance_interval < MAX_PINNED_INTERVAL) ||
(sd->balance_interval < sd->max_interval))
Expand Down Expand Up @@ -2357,7 +2369,8 @@ static void rebalance_tick(int this_cpu, runqueue_t *this_rq,

if (j - sd->last_balance >= interval) {
if (load_balance(this_cpu, this_rq, sd, idle)) {
/* We've pulled tasks over so either we're no
/*
* We've pulled tasks over so either we're no
* longer idle, or one of our SMT siblings is
* not idle.
*/
Expand Down

0 comments on commit 32ecdd1

Please sign in to comment.