diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 3ee2ae45125f..bc38804e40dd 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4031,7 +4031,7 @@ long sched_getaffinity(pid_t pid, cpumask_t *mask) | |||
4031 | goto out_unlock; | 4031 | goto out_unlock; |
4032 | 4032 | ||
4033 | retval = 0; | 4033 | retval = 0; |
4034 | cpus_and(*mask, p->cpus_allowed, cpu_possible_map); | 4034 | cpus_and(*mask, p->cpus_allowed, cpu_online_map); |
4035 | 4035 | ||
4036 | out_unlock: | 4036 | out_unlock: |
4037 | read_unlock(&tasklist_lock); | 4037 | read_unlock(&tasklist_lock); |
@@ -5141,7 +5141,7 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span, | |||
5141 | #define SEARCH_SCOPE 2 | 5141 | #define SEARCH_SCOPE 2 |
5142 | #define MIN_CACHE_SIZE (64*1024U) | 5142 | #define MIN_CACHE_SIZE (64*1024U) |
5143 | #define DEFAULT_CACHE_SIZE (5*1024*1024U) | 5143 | #define DEFAULT_CACHE_SIZE (5*1024*1024U) |
5144 | #define ITERATIONS 2 | 5144 | #define ITERATIONS 1 |
5145 | #define SIZE_THRESH 130 | 5145 | #define SIZE_THRESH 130 |
5146 | #define COST_THRESH 130 | 5146 | #define COST_THRESH 130 |
5147 | 5147 | ||
@@ -5480,9 +5480,9 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2) | |||
5480 | break; | 5480 | break; |
5481 | } | 5481 | } |
5482 | /* | 5482 | /* |
5483 | * Increase the cachesize in 5% steps: | 5483 | * Increase the cachesize in 10% steps: |
5484 | */ | 5484 | */ |
5485 | size = size * 20 / 19; | 5485 | size = size * 10 / 9; |
5486 | } | 5486 | } |
5487 | 5487 | ||
5488 | if (migration_debug) | 5488 | if (migration_debug) |
@@ -5551,13 +5551,15 @@ static void calibrate_migration_costs(const cpumask_t *cpu_map) | |||
5551 | -1 | 5551 | -1 |
5552 | #endif | 5552 | #endif |
5553 | ); | 5553 | ); |
5554 | printk("migration_cost="); | 5554 | if (system_state == SYSTEM_BOOTING) { |
5555 | for (distance = 0; distance <= max_distance; distance++) { | 5555 | printk("migration_cost="); |
5556 | if (distance) | 5556 | for (distance = 0; distance <= max_distance; distance++) { |
5557 | printk(","); | 5557 | if (distance) |
5558 | printk("%ld", (long)migration_cost[distance] / 1000); | 5558 | printk(","); |
5559 | printk("%ld", (long)migration_cost[distance] / 1000); | ||
5560 | } | ||
5561 | printk("\n"); | ||
5559 | } | 5562 | } |
5560 | printk("\n"); | ||
5561 | j1 = jiffies; | 5563 | j1 = jiffies; |
5562 | if (migration_debug) | 5564 | if (migration_debug) |
5563 | printk("migration: %ld seconds\n", (j1-j0)/HZ); | 5565 | printk("migration: %ld seconds\n", (j1-j0)/HZ); |
@@ -6109,7 +6111,7 @@ void __init sched_init(void) | |||
6109 | runqueue_t *rq; | 6111 | runqueue_t *rq; |
6110 | int i, j, k; | 6112 | int i, j, k; |
6111 | 6113 | ||
6112 | for (i = 0; i < NR_CPUS; i++) { | 6114 | for_each_cpu(i) { |
6113 | prio_array_t *array; | 6115 | prio_array_t *array; |
6114 | 6116 | ||
6115 | rq = cpu_rq(i); | 6117 | rq = cpu_rq(i); |