Commit ac7349b6 authored by Patrick Mochel's avatar Patrick Mochel

[PATCH] Re: Performance issue in 2.5.32+

- The early startup code was changed so smp_prepare_cpus() is now called
  before do_basic_setup().  do_basic_setup() is where mtrr_init() is
  called, which mtrr_init_secondary_cpu() is dependent on being called.

- mtrr_init_boot_cpu() was removed from the AP startup code. This was a
  SMP-only hack that made sure mtrr_init() happened when SMP was
  enabled.  That's right - two different code paths to do the same
  thing, obscured by compile-time defines.

The appended patch makes sure mtrr_init() is called before
smp_prepare_cpus(). It's ugly, and I'll work on a cleaner solution, but
James: could you try it and see if it fixes your performance issues?
parent 4b84bbe0
......@@ -490,15 +490,6 @@ static void __init do_initcalls(void)
*/
static void __init do_basic_setup(void)
{
#if defined(CONFIG_MTRR) /* Do this after SMP initialization */
/*
* We should probably create some architecture-dependent "fixup after
* everything is up" style function where this would belong better
* than in init/main.c..
*/
mtrr_init();
#endif
#ifdef CONFIG_SYSCTL
sysctl_init();
#endif
......@@ -545,6 +536,15 @@ static int init(void * unused)
*/
child_reaper = current;
#if defined(CONFIG_MTRR) /* Do this after SMP initialization */
/*
* We should probably create some architecture-dependent "fixup after
* everything is up" style function where this would belong better
* than in init/main.c..
*/
mtrr_init();
#endif
/* Sets up cpus_possible() */
smp_prepare_cpus(max_cpus);
......
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