Re: [PATCH 0/2] Paravirt loops per jiffy calculation

2008-07-27 Thread Avi Kivity

Glauber Costa wrote:

Hey,

Over the last weeks, there has been some discussion regarding paravirt
lpj calculation for kvm. Here's my shot at that.

KVM hypervisor already put the right value in our pvclock structures,
as part of the xen compatibility efforts.

So the first patch moves the respective xen code to pvclock.c (since
we'll be doing the same calculation anyway), while the second, implements
functions for kvm that makes use of it.

Turns out that only implementing a pv get_tsc_khz is not enough, since
it will only do the right thing for cpu0, which is not what we desire.

So we set preset_lpj. Recall this code is run before arch parameter setup,
so if we pass lpj=xx in the command line, it'll still work.

Have a good (paravirtual) time!

  


I only have this email out of the patchset.  Please resend.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] Paravirt loops per jiffy calculation

2008-07-23 Thread Glauber Costa
On Wed, Jul 23, 2008 at 7:07 AM, Gerd Hoffmann [EMAIL PROTECTED] wrote:
  Hi,

 Turns out that only implementing a pv get_tsc_khz is not enough, since
 it will only do the right thing for cpu0, which is not what we desire.

 So we set preset_lpj. Recall this code is run before arch parameter setup,
 so if we pass lpj=xx in the command line, it'll still work.

 Hmm, why kvm needs the preset_lpj thing and xen doesn't?

I asked myself the same question. But from the snippet in calibrate.c:

if (preset_lpj) {
loops_per_jiffy = preset_lpj;
printk(KERN_INFO
Calibrating delay loop (skipped) preset value.. );
} else if ((smp_processor_id() == 0)  lpj_fine) {
loops_per_jiffy = lpj_fine;
printk(KERN_INFO
Calibrating delay loop (skipped), 
value calculated using timer frequency.. );
} else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) {
printk(KERN_INFO
Calibrating delay using timer specific routine.. );


The third one is the one we want to skip. The second one, runs only for CPU0.
calibrate_delay_loop() itself, is called very early from smp_callin,
and tsc calibration only sets lpj_fine. So I don't see too much of an
option here.


 cheers,
  Gerd

 --
 http://kraxel.fedorapeople.org/xenner/
 --
 To unsubscribe from this list: send the line unsubscribe kvm in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html




-- 
Glauber Costa.
Free as in Freedom
http://glommer.net

The less confident you are, the more serious you have to act.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html