Re: [Xen-devel] Re: [GIT PULL] xen /proc/mtrr implementation
From: Ingo Molnar
Date: Tue May 19 2009 - 11:26:22 EST
* Gerd Hoffmann <kraxel@xxxxxxxxxx> wrote:
>>>>> No, the linux kernel probably should do the wrmsr on one cpu only then.
>>>> Why?
>
>> | The change of MTRR's on _any_ of the guest CPUs in a dom0 context
>> | should immediately be refected on all CPUs. Assymetric MTRR
>> | settings are madness.
>
> Exactly. And thats why it is pointless to let the dom0 kernel
> write the mtrr msrs on more than one cpu.
How does this negate my claim that the Linux kernel needs no
modifications? (which i think your point is - let me know if you
have some other point here.)
the Xen hypervisor can simply repeat all requests (i.e. not care at
all about the fact that a guest does these modifications on all CPUs
it sees), or realize that the modification has already been done and
skip it. This is in no way a performance sensitive codepath - mtrrs
are only modified in init sequences - and setting mtrrs is slow and
globally serialized to begin with.
>>>>> Oops, the third "proper technical solutions" is missing.
>>>> Yeah, the third one is to not touch MTRRs after bootup and use PAT.
>>> Works only in case the CPU has PAT support.
>>
>> Which specific CPU without PAT support do you worry about?
>
> For example: I have a Notebook here, with MTRR and without PAT
> according to the boot log. "Pentium III (Coppermine)" says
> /proc/cpuinfo.
That's a really old CPU, but even Coppermine has PAT support in the
CPU. You need to go back to things like P5 200 MHz CPUs to find
PAT-less CPUs.
On the Linux side it's easy to enable it (and _such_ a patch would
make sense indeed) - it's just that nobody has yet gone through the
effort of testing and validating the PAT code on that CPU. If you
care enough, you can do it, send a patch and ping the Intel folks
about it.
Once the issues are framed correctly, Linux is helped for real.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/