Commit 85841fc0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sched: reduce idle time

From: Nick Piggin <nickpiggin@yahoo.com.au>

It makes NEWLY_IDLE balances cause find_busiest_group return the busiest
available group even if there isn't an imbalance.  Basically - try a bit
harder to prevent schedule emptying the runqueue.

It is quite aggressive, but that isn't so bad because we don't (by default)
do NEWLY_IDLE balancing across NUMA nodes, and NEWLY_IDLE balancing is always
restricted to cache_hot tasks.

It picked up a little bit of idle time that dbt2-pgsql was seeing...
parent 8c8cfc36
...@@ -1630,7 +1630,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, ...@@ -1630,7 +1630,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
return busiest; return busiest;
out_balanced: out_balanced:
if (busiest && idle != NOT_IDLE && max_load > SCHED_LOAD_SCALE) { if (busiest && (idle == NEWLY_IDLE ||
(idle == IDLE && max_load > SCHED_LOAD_SCALE)) ) {
*imbalance = 1; *imbalance = 1;
return busiest; return busiest;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment