From: Ingo Molnar Date: Mon, 30 Jan 2006 19:24:38 +0000 (+0100) Subject: [PATCH] Fix boot-time slowdown for measure_migration_cost X-Git-Tag: v2.6.16-rc2~251 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70b4d63e98fd93fb9742708a54f872cba24e0fea;p=linux-2.6 [PATCH] Fix boot-time slowdown for measure_migration_cost This reduces the amount of time the migration cost calculations cost during bootup. Based on numbers by Tony Luck . Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 3ee2ae4512..ec7fd9cee3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5141,7 +5141,7 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span, #define SEARCH_SCOPE 2 #define MIN_CACHE_SIZE (64*1024U) #define DEFAULT_CACHE_SIZE (5*1024*1024U) -#define ITERATIONS 2 +#define ITERATIONS 1 #define SIZE_THRESH 130 #define COST_THRESH 130 @@ -5480,9 +5480,9 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2) break; } /* - * Increase the cachesize in 5% steps: + * Increase the cachesize in 10% steps: */ - size = size * 20 / 19; + size = size * 10 / 9; } if (migration_debug)