[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071120170222.GB31044@Krystal>
Date: Tue, 20 Nov 2007 12:02:22 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@....de>, "H. Peter Anvin" <hpa@...or.com>,
Chuck Ebbert <cebbert@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 5/8] Immediate Values - x86 Optimization (simplified)
* Rusty Russell (rusty@...tcorp.com.au) wrote:
> On Tuesday 20 November 2007 01:28:03 Mathieu Desnoyers wrote:
> > * Rusty Russell (rusty@...tcorp.com.au) wrote:
> > > I think it would be easier to just fast-path the num_online_cpus == 1
> > > case, even if you want to keep this "update_early" interface.
> >
> > Nope, that could lead to problems. I call core_immediate_update()
> > _very_ early, before boot_cpu_init() is called.
>
> Ah, I see the problem. It would in fact be clearer for us to move
> boot_cpu_init() up to just after smp_setup_processor_id() in start_kernel
> anyway, not just for this code, but in general.
>
Could be done.
> > Therefore,
> > cpu_online_map is not set yet. I am not sure the benefit of using
> > num_online_cpus outweights the added fragility wrt other boot process
> > initializations.
>
> I think it's still a win, though worth a comment that we always go via the
> non-IPI path for the early boot case.
>
Ok, another potential problem then :
If we fast-path the num_online_cpus == 1, then updates done after the
boot process will have to go through this code. Therefore, we would have
to disable interrupts in the early boot code.
However, I doubt it is safe to use the paravirtualized
local_irq_disable/enable before the paravirt code is executed ?
Mathieu
> Cheers,
> Rusty.
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists