Re: [PATCH] x86: put trigger in to detect mismatched apic versions.

From: Ingo Molnar
Date: Sun Jan 18 2009 - 14:04:56 EST



* Mike Travis <travis@xxxxxxx> wrote:

> Ingo Molnar wrote:
> > * Mike Travis <travis@xxxxxxx> wrote:
> >
> >> Hi Ingo,
> >>
> >> I did notice that the versions all came up the same, and that the checks
> >> were very specific. I was trying to be as transparent and unintrusive
> >> as possible. Since there's so few calls, I though this was a good
> >> approach but apparently I was wrong.
> >>
> >> I like the idea of collapsing the array down to one and checking to see
> >> if all apic's have the same version, but is this really the case? Must
> >> all apics be the same?
> >
> > Could you please send a patch that doesnt change the code, only adds a
> > 'boot APIC version' kind of variable as an apic_version __read_mostly
> > variable and does a WARN_ONCE() if that mismatches? We can then stick that
> > into -tip and see whether it triggers.
> >
> > The max array size is ~128K, right? So if the WARN_ONCE() does not
> > trigger, we can just drop the array and use the central apic_version
> > variable ...
> >
> > And even if it _does_ trigger, the version incompatibilities between APIC
> > protocols are very rare. They only happen across wildly different CPU
> > architectures like when going from very old external apics to integrated
> > apics, or going from apics to x-apics. We wont see any mixing across those
> > boundaries.
> >
> > Ingo
>
> Btw, I checked with our UV architect and the problem is that we need a
> 16 bit apic id which is what caused the MAX_APICS to be bumped to 32k.
> The lower 8 bits are the normal apic id, and the upper bit relate to the
> node. This means cpu 0 on node 0 has the same apic id as cpu 0 on node
> 1, etc. I also asked about whether we could rely on always having the
> same apic version, and the answer was yes, though it's really only
> relevant between the cpus on a node.
>
> Thanks,
> Mike
> ---
> Subject: x86: put trigger in to detect mismatched apic versions.
>
> Fire off one message if two apic's discovered with different
> apic versions.
>
> Signed-off-by: Mike Travis <travis@xxxxxxx>
> ---
> arch/x86/kernel/apic.c | 5 +++++
> 1 file changed, 5 insertions(+)

Applied to tip/x86/urgent, thanks Mike! Note: for such changes we want a
more comprehensive changelog that explains the motivation - i wrote one
up, see the commit below.

Ingo

------------->