Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Gleb Natapov
On Mon, Jan 16, 2012 at 07:41:17PM +0530, Srivatsa Vaddagiri wrote: * Avi Kivity a...@redhat.com [2012-01-16 12:14:27]: One option is to make the kick hypercall available only when yield_on_hlt=1? It's not a good idea to tie various options together. Features should be orthogonal.

Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2012-01-17 Thread Marcelo Tosatti
On Sat, Jan 14, 2012 at 11:56:46PM +0530, Raghavendra K T wrote: Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has required feature (KVM_FEATURE_PVLOCK_KICK) to support pv-ticketlocks. If so,

Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2012-01-17 Thread Srivatsa Vaddagiri
* Marcelo Tosatti mtosa...@redhat.com [2012-01-17 09:02:11]: +/* Kick vcpu waiting on @lock-head to reach value @ticket */ +static void kvm_unlock_kick(struct arch_spinlock *lock, __ticket_t ticket) +{ + int cpu; + int apicid; + + add_stats(RELEASED_SLOW, 1); + +

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Srivatsa Vaddagiri
* Gleb Natapov g...@redhat.com [2012-01-17 11:14:13]: The problem case I was thinking of was when guest VCPU would have issued HLT with interrupts disabled. I guess one option is to inject an NMI, and have the guest kernel NMI handler recognize this and make adjustments such that the vcpu

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Gleb Natapov
On Tue, Jan 17, 2012 at 05:56:50PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 11:14:13]: The problem case I was thinking of was when guest VCPU would have issued HLT with interrupts disabled. I guess one option is to inject an NMI, and have the guest

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Srivatsa Vaddagiri
* Gleb Natapov g...@redhat.com [2012-01-17 14:51:26]: On Tue, Jan 17, 2012 at 05:56:50PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 11:14:13]: The problem case I was thinking of was when guest VCPU would have issued HLT with interrupts disabled. I

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Raghavendra K T
On 01/17/2012 06:21 PM, Gleb Natapov wrote: On Tue, Jan 17, 2012 at 05:56:50PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapovg...@redhat.com [2012-01-17 11:14:13]: The problem case I was thinking of was when guest VCPU would have issued HLT with interrupts disabled. I guess one option is to

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Gleb Natapov
On Tue, Jan 17, 2012 at 06:41:03PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 14:51:26]: On Tue, Jan 17, 2012 at 05:56:50PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 11:14:13]: The problem case I was thinking of

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Srivatsa Vaddagiri
* Gleb Natapov g...@redhat.com [2012-01-17 15:20:51]: Having the hypercall makes the intent of vcpu (to sleep on a kick) clear to hypervisor vs assuming that because of a trapped HLT instruction (which will anyway won't work when yield_on_hlt=0). The purpose of yield_on_hlt=0 is to

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Gleb Natapov
On Tue, Jan 17, 2012 at 07:58:18PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 15:20:51]: Having the hypercall makes the intent of vcpu (to sleep on a kick) clear to hypervisor vs assuming that because of a trapped HLT instruction (which will anyway

Re: [PATCH RFC V4 5/5] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2012-01-17 Thread Marcelo Tosatti
On Tue, Jan 17, 2012 at 05:32:33PM +0200, Gleb Natapov wrote: On Tue, Jan 17, 2012 at 07:58:18PM +0530, Srivatsa Vaddagiri wrote: * Gleb Natapov g...@redhat.com [2012-01-17 15:20:51]: Having the hypercall makes the intent of vcpu (to sleep on a kick) clear to hypervisor vs

Re: [PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests

2012-01-17 Thread Raghavendra K T
On 01/17/2012 12:12 AM, Alexander Graf wrote: On 16.01.2012, at 19:38, Raghavendra K T wrote: On 01/16/2012 07:53 PM, Alexander Graf wrote: On 16.01.2012, at 15:20, Srivatsa Vaddagiri wrote: * Alexander Grafag...@suse.de [2012-01-16 04:57:45]: Speaking of which - have you benchmarked

Re: [PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests

2012-01-17 Thread Alexander Graf
On 17.01.2012, at 18:27, Raghavendra K T wrote: On 01/17/2012 12:12 AM, Alexander Graf wrote: On 16.01.2012, at 19:38, Raghavendra K T wrote: On 01/16/2012 07:53 PM, Alexander Graf wrote: On 16.01.2012, at 15:20, Srivatsa Vaddagiri wrote: * Alexander Grafag...@suse.de [2012-01-16

Re: [PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests

2012-01-17 Thread Raghavendra K T
On 01/17/2012 11:09 PM, Alexander Graf wrote: On 17.01.2012, at 18:27, Raghavendra K T wrote: On 01/17/2012 12:12 AM, Alexander Graf wrote: On 16.01.2012, at 19:38, Raghavendra K T wrote: On 01/16/2012 07:53 PM, Alexander Graf wrote: On 16.01.2012, at 15:20, Srivatsa Vaddagiri wrote:

Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2012-01-17 Thread Raghavendra K T
On 01/17/2012 04:32 PM, Marcelo Tosatti wrote: On Sat, Jan 14, 2012 at 11:56:46PM +0530, Raghavendra K T wrote: Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c7b05fc..4d7a950 100644 --- a/arch/x86/kvm/x86.c

Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2012-01-17 Thread Jeremy Fitzhardinge
On 01/17/2012 10:33 PM, Srivatsa Vaddagiri wrote: * Marcelo Tosatti mtosa...@redhat.com [2012-01-17 09:02:11]: +/* Kick vcpu waiting on @lock-head to reach value @ticket */ +static void kvm_unlock_kick(struct arch_spinlock *lock, __ticket_t ticket) +{ + int cpu; + int apicid; + +

Re: [PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests

2012-01-17 Thread Raghavendra K T
On 01/18/2012 03:27 AM, Dave Hansen wrote: On 01/17/2012 10:36 AM, Raghavendra K T wrote: It was a quick test. two iteration of kernbench (=6runs) and had ensured cache is cleared. echo 1 /proc/sys/vm/drop_caches ccache -C. Yes may be I can run test as you mentioned.. echo 3

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2012-01-17 Thread Rusty Russell
On Fri, 13 Jan 2012 04:19:30 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jan 12, 2012 at 12:12:17PM +1030, Rusty Russell wrote: On Thu, 12 Jan 2012 00:02:33 +0200, Michael S. Tsirkin m...@redhat.com wrote: Look, we have a race currently. Let us not tie a bug fix to a huge