OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 1/3] Introduce cpuid_on_cpu() and cpuid_eax_on_cpu()
Re: [PATCH 1/3] Introduce cpuid_on_cpu() and cpuid_eax_on_cpu() [message #11672 is a reply to message #11669] Mon, 02 April 2007 12:10 Go to previous messageGo to previous message
Andi Kleen is currently offline  Andi Kleen
Messages: 33
Registered: February 2006
Member
On Monday 02 April 2007 13:38, Alexey Dobriyan wrote:
> They will be used by cpuid driver and powernow-k8 cpufreq driver.
>
> With these changes powernow-k8 driver could run correctly on OpenVZ kernels
> with virtual cpus enabled (SCHED_VCPU).

This means openvz has multiple virtual CPU levels? One for cpuid/rdmsr and one
for the rest of the kernel? Both powernow-k8 and cpuid attempt to schedule
to the target CPU so they should already run there. But it is some other CPU,
but when they ask your _on_cpu() functions they suddenly get a "real" CPU?
Where is the difference between these levels of virtualness?

That sounds quite fragile and will likely break often. I just rejected a similar
concept -- virtual nodes and "physical nodes" for similar reasons.

Also it has weird semantics. For example if you have multiple
virtual CPUs mapping to a single CPU then would the powernow-k8 driver
try to set the frequency multiple times on the same physical CPU? That might
go wrong actually because the CPU might not be happy to be poked again
while it is already in a frequency change. Also there is no locking
so in theory two vcpus might try to change frequency in parallel with
probably quite bad effects.

I'm sure there are other scenarios with similar problems. e.g. what
happens with microcode updates etc.?

Before adding any hacks like this I think your vcpu concept
needs to be discussed properly on l-k. For me it doesn't look like it is
something good right now though.

-Andi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 3/3] cpuid: switch to cpuid_on_cpu()
Next Topic: Grr sysfs networking changes...
Goto Forum:
  


Current Time: Tue Sep 02 01:00:35 GMT 2025

Total time taken to generate the page: 0.06679 seconds