qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] cpufreq and QEMU guests


From: Benoît Canet
Subject: Re: [Qemu-devel] cpufreq and QEMU guests
Date: Mon, 16 Sep 2013 17:05:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Le Monday 16 Sep 2013 à 09:39:10 (-0500), Alexander Graf a écrit :
> 
> 
> Am 16.09.2013 um 07:15 schrieb Benoît Canet <address@hidden>:
> 
> > 
> > Hello,
> > 
> > I know a cloud provider worried about the fact that the /proc/cpuinfo of his
> > guests give a bogus frequency to his customer.
> > 
> > QEMU and the guests kernel currently have no way to reflect the host 
> > frequency
> > changes to the guests.
> > 
> > The customer compute intensive application then read this information and 
> > take
> > wrong decisions.
> 
> Why do they care about the frequency? Is it for scheduling workloads? The 
> only other case I can think of would be the TSC and that should be fixed 
> frequency these days.
> 
> If it's scheduling, you could maybe expose the unavailable compute time as 
> steal time to the guest. Exposibg frequency in a virtual environment feels 
> backwards.

The final customer have a compute intensive workload.
At startup the code retrieve the cpu cache topology, the cpu model, and various
informations including the guest cpu frequency before starting the compute job.
The QEMU instance typicaly use -cpu host.

The code inspects the cpu frequency has seen by the guests to choose the number
of vms to instanciate to compute the given task.
They even destroy and recreate some vms that would be underperforming to
mitigate the high inter vm communication costs.

Do you think the steal time trick would work for this ?

Best regards

Benoît


> 
> Alex
> 
> > 
> > I looked at the various Linux cpufreq drivers and they all seems to be table
> > based. Is it true ?
> > 
> > For example the acpi cpufreq driver have 16 differents pstates at hand to 
> > lookup
> > in the pstate table and get the frequency.
> > 
> > Given that guests can migrate from one hardware to a slightly different 
> > hardware
> > the table may become wrong after live migration.
> > 
> > What would be the best hardware to emulate in order to pass an arbitrary
> > frequency to the guest ?
> > 
> > Would a pvfreq paravirtualized QEMU hardware and a guest driver implementing
> > only the callbacks needed to read the frequency be a good idea ?
> > 
> > Best regards
> > 
> > Benoît
> > 
> > ps:
> > I CC this mail to the other QEMU arch maintainers because the problem must 
> > be
> > the same everywhere where KVM run.
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to address@hidden
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]