Re: [PATCH 4/4] KVM/MIPS32: Bring in patch from David Daney with new 64 bit compatible ABI.

2013-05-19 Thread Gleb Natapov
On Sun, May 19, 2013 at 02:17:33PM -0700, David Daney wrote: > On 05/19/2013 07:17 AM, Gleb Natapov wrote: > >On Sat, May 18, 2013 at 06:54:26AM -0700, Sanjay Lal wrote: > >>From: David Daney > >> > >>There are several parts to this: > >> > >>o All registers are 64-bits wide, 32-bit guests use the

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Jason Wang
On 05/20/2013 12:22 PM, Qinchuanyu wrote: > The patch below is base on > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/vhost/vhost.c?id=refs/tags/next-20130517 > > Signed-off-by: Chuanyu Qin > --- a/drivers/vhost/vhost.c 2013-05-20 11:47:05.0 +0800 > ++

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Qinchuanyu
The patch below is base on https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/vhost/vhost.c?id=refs/tags/next-20130517 Signed-off-by: Chuanyu Qin --- a/drivers/vhost/vhost.c 2013-05-20 11:47:05.0 +0800 +++ b/drivers/vhost/vhost.c 2013-05-20 11:48:24.000

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Lei Li
On 05/20/2013 11:38 AM, Jason Wang wrote: On 05/20/2013 11:06 AM, Qinchuanyu wrote: Right now the wake_up_process func is included in spin_lock/unlock, but it could be done outside the spin_lock. I have test it with kernel 3.0.27 and guest suse11-sp2, it provide 2%-3% net performance improved.

Re: VFIO VGA test branches

2013-05-19 Thread Alex Williamson
On Sun, 2013-05-19 at 17:35 +0200, Knut Omang wrote: > On Mon, 2013-05-13 at 16:23 -0600, Alex Williamson wrote: > > On Mon, 2013-05-13 at 22:55 +0200, Knut Omang wrote: > > > Hi all, > > > > > > Perfect timing from my perspective, thanks Alex! > > > > > > I spent the better part of the weekend t

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Jason Wang
On 05/20/2013 11:06 AM, Qinchuanyu wrote: > Right now the wake_up_process func is included in spin_lock/unlock, but it > could be done outside the spin_lock. > I have test it with kernel 3.0.27 and guest suse11-sp2, it provide 2%-3% net > performance improved. > > Signed-off-by: Chuanyu Qin Mak

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Jason Wang
On 05/20/2013 06:56 AM, Narasimhan, Sriram wrote: > Hi Michael, > > Comments inline... > > -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Sunday, May 19, 2013 1:03 PM > To: Narasimhan, Sriram > Cc: ru...@rustcorp.com.au; virtualizat...@lists.linux-foundation

Re: [Qemu-devel] VFIO VGA test branches

2013-05-19 Thread Alex Williamson
On Sun, 2013-05-19 at 23:26 +0400, Maik Broemme wrote: > Hi Knut, > > Knut Omang wrote: > > > > On Mon, 2013-05-13 at 16:23 -0600, Alex Williamson wrote: > > > On Mon, 2013-05-13 at 22:55 +0200, Knut Omang wrote: > > > > Hi all, > > > > > > > > Perfect timing from my perspective, thanks Alex! >

[PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Qinchuanyu
Right now the wake_up_process func is included in spin_lock/unlock, but it could be done outside the spin_lock. I have test it with kernel 3.0.27 and guest suse11-sp2, it provide 2%-3% net performance improved. Signed-off-by: Chuanyu Qin --- a/drivers/vhost/vhost.c 2013-05-20 10:36:30.0

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-19 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> Macro still isn't usable, because userspace can't know whether it's the >> new or old. >> >> We need to either remove it from UAPI, or rename it to >> VIRTIO_PCI_CONFIG_OFF. > > Surely, if userspace is using it as is, you can't remove it, rename

Re: [PATCHv2] virtio_pci: better macro exported in uapi

2013-05-19 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Macro VIRTIO_PCI_CONFIG assumes that userspace actually has a structure > with a field named msix_enabled. Add VIRTIO_PCI_CONFIG_OFF that gets > the msix_enabled by value instead, to make it useful for userspace. We > still keep VIRTIO_PCI_CONFIG around for now, i

provide vhost thread per virtqueue for forwarding scenario

2013-05-19 Thread Qinchuanyu
Vhost thread provide both tx and rx ability for virtio-net. In the forwarding scenarios, tx and rx share the vhost thread, and throughput is limited by single thread. So I did a patch for provide vhost thread per virtqueue, not per vhost_net. Of course, multi-queue virtio-net is final solution,

RE: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Narasimhan, Sriram
Hi Michael, Comments inline... -Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: Sunday, May 19, 2013 1:03 PM To: Narasimhan, Sriram Cc: ru...@rustcorp.com.au; virtualizat...@lists.linux-foundation.org; kvm@vger.kernel.org; net...@vger.kernel.org; linux-ker...@v

Re: [PATCH 4/4] KVM/MIPS32: Bring in patch from David Daney with new 64 bit compatible ABI.

2013-05-19 Thread David Daney
On 05/19/2013 07:17 AM, Gleb Natapov wrote: On Sat, May 18, 2013 at 06:54:26AM -0700, Sanjay Lal wrote: From: David Daney There are several parts to this: o All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. o FPU register forma

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 04:23:22PM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 19:40 +0300, Michael S. Tsirkin wrote: > > > OK I get it. So let me correct myself. The simple code > > that does something like this under a spinlock: > > > preempt_disable > > > pagefault_disable

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 19:40 +0300, Michael S. Tsirkin wrote: > OK I get it. So let me correct myself. The simple code > that does something like this under a spinlock: > > preempt_disable > > pagefault_disable > > error = copy_to_user > > pagefault_enable > > preempt_

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 04:09:48PM +, Narasimhan, Sriram wrote: > Hi Michael, > > I was getting all packets on the same inbound queue which > is why I added this support to virtio-net (and some more > instrumentation at tun as well). But, it turned out to be > my misconfiguration - I did not

Re: [Qemu-devel] VFIO VGA test branches

2013-05-19 Thread Maik Broemme
Hi Knut, Knut Omang wrote: > > On Mon, 2013-05-13 at 16:23 -0600, Alex Williamson wrote: > > On Mon, 2013-05-13 at 22:55 +0200, Knut Omang wrote: > > > Hi all, > > > > > > Perfect timing from my perspective, thanks Alex! > > > > > > I spent the better part of the weekend testing your branches

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 12:06:19PM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 16:34 +0300, Michael S. Tsirkin wrote: > > > Right but we need to keep it working on upstream as well. > > If I do preempt_enable under a spinlock upstream won't it > > try to sleep under spinlock? > > No it w

RE: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Narasimhan, Sriram
Hi Michael, I was getting all packets on the same inbound queue which is why I added this support to virtio-net (and some more instrumentation at tun as well). But, it turned out to be my misconfiguration - I did not enable IFF_MULTI_QUEUE on the tap device, so the real_num_tx_queues on tap netde

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 16:34 +0300, Michael S. Tsirkin wrote: > Right but we need to keep it working on upstream as well. > If I do preempt_enable under a spinlock upstream won't it > try to sleep under spinlock? No it wont. A spinlock calls preempt_disable implicitly, and a preempt_enable() will

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-19 Thread Paolo Bonzini
Il 19/05/2013 09:06, Vadim Rozenfeld ha scritto: > Signed-off: Peter Lieven > Signed-off: Gleb Natapov > Signed-off: Vadim Rozenfeld > > v1 -> v2 > 1. mark TSC page dirty as suggested by > Eric Northup and Gleb > 2. disable local irq when calling get_kernel_ns, > as it was done by Pe

Re: [PATCH 2/4] KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

2013-05-19 Thread Sanjay Lal
On May 19, 2013, at 8:52 AM, Gleb Natapov wrote: > On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote: >> - As suggested by Gleb, wrap calls to gfn_to_pfn() with >> srcu_read_lock/unlock(). >> Memory slots should be acccessed from a SRCU read section. >> - kvm_mips_map_page() now return

Re: [PATCH 4/4] KVM/MIPS32: Bring in patch from David Daney with new 64 bit compatible ABI.

2013-05-19 Thread Gleb Natapov
On Sat, May 18, 2013 at 06:54:26AM -0700, Sanjay Lal wrote: > From: David Daney > > There are several parts to this: > > o All registers are 64-bits wide, 32-bit guests use the least > significant portion of the register storage fields. > > o FPU register formats are defined. > > o CP0 Regis

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-19 Thread Gleb Natapov
On Sun, May 19, 2013 at 05:06:36PM +1000, Vadim Rozenfeld wrote: > Signed-off: Peter Lieven > Signed-off: Gleb Natapov > Signed-off: Vadim Rozenfeld > > v1 -> v2 > 1. mark TSC page dirty as suggested by > Eric Northup and Gleb > 2. disable local irq when calling get_kernel_ns, > as i

Re: [PATCH 05/18] KVM/MIPS32-VZ: VZ-ASE assembler wrapper functions to set GuestIDs

2013-05-19 Thread Sergei Shtylyov
Hello. On 19-05-2013 9:47, Sanjay Lal wrote: Signed-off-by: Sanjay Lal --- arch/mips/kvm/kvm_vz_locore.S | 74 +++ 1 file changed, 74 insertions(+) create mode 100644 arch/mips/kvm/kvm_vz_locore.S diff --git a/arch/mips/kvm/kvm_vz_locore.S b/arch

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 08:34:04AM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 12:35 +0300, Michael S. Tsirkin wrote: > > > No, I was not assuming that. What I'm trying to say is that a caller > > that does something like this under a spinlock: > > preempt_disable > > pagefault_di

[PATCHv2] virtio_pci: better macro exported in uapi

2013-05-19 Thread Michael S. Tsirkin
Macro VIRTIO_PCI_CONFIG assumes that userspace actually has a structure with a field named msix_enabled. Add VIRTIO_PCI_CONFIG_OFF that gets the msix_enabled by value instead, to make it useful for userspace. We still keep VIRTIO_PCI_CONFIG around for now, in case some userspace uses it. Signed-

Re: [PATCH 2/4] KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

2013-05-19 Thread Gleb Natapov
On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote: > - As suggested by Gleb, wrap calls to gfn_to_pfn() with > srcu_read_lock/unlock(). > Memory slots should be acccessed from a SRCU read section. > - kvm_mips_map_page() now returns an error code to it's callers, instead of > calling p

Re: [PATCH] KVM: take over co-maintainership from Marcelo, fix MAINTAINERS entry

2013-05-19 Thread Gleb Natapov
On Wed, May 15, 2013 at 07:02:24PM +0200, Paolo Bonzini wrote: > As announced last week by Marcelo Tosatti, I will be co-maintaining > KVM together with Gleb. > Applied, thanks. > Cc: Marcelo Tosatti > Cc: Gleb Natapov > Cc: kvm@vger.kernel.org > Signed-off-by: Paolo Bonzini > --- > MAINTAINE

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 12:35 +0300, Michael S. Tsirkin wrote: > No, I was not assuming that. What I'm trying to say is that a caller > that does something like this under a spinlock: > preempt_disable > pagefault_disable > error = copy_to_user > pagefault_enable > pree

Re: Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with "entry failed, hardware error 0x80000021"

2013-05-19 Thread Gleb Natapov
On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote: > Dear KVM maintainers, it appears that there is a gap in x86 emulation, > at least on a 32-bit host. Stefan found this when running GRML, a live > distribution which can be downloaded from: >

Re: [PATCH v3 0/2] ARM: KVM: Moving GIC/timer out of arch/arm

2013-05-19 Thread Gleb Natapov
On Tue, May 14, 2013 at 02:31:00PM +0100, Marc Zyngier wrote: > As KVM/arm64 is looming on the horizon, it makes sense to move some > of the common code to a single location in order to reduce duplication. > > The code could live anywhere. Actually, most of KVM is already built > with a bunch of u

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Michael S. Tsirkin
On Thu, May 16, 2013 at 01:24:29PM -0700, Sriram Narasimhan wrote: > This patch allows virtio-net driver to report traffic distribution > to inbound/outbound queues through ethtool -S. The per_cpu > virtnet_stats is split into receive and transmit stats and are > maintained on a per receive_queue

Re: [PATCH v6 0/7] KVM: MMU: fast zap all shadow pages

2013-05-19 Thread Gleb Natapov
On Fri, May 17, 2013 at 05:12:55AM +0800, Xiao Guangrong wrote: > The benchmark and the result can be found at: > http://www.spinics.net/lists/kvm/msg91391.html > I asked a couple of questions on some patches, but overall this looks good to me. Marcelo can you look at this too? > Changlog: > V6:

Re: [PATCH v6 2/7] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page

2013-05-19 Thread Gleb Natapov
On Fri, May 17, 2013 at 05:12:57AM +0800, Xiao Guangrong wrote: > Move deletion shadow page from the hash list from kvm_mmu_commit_zap_page to > kvm_mmu_prepare_zap_page so that we can call kvm_mmu_commit_zap_page > once for multiple kvm_mmu_prepare_zap_page that can help us to avoid > unnecessary

Re: [PATCH v6 3/7] KVM: MMU: fast invalidate all pages

2013-05-19 Thread Gleb Natapov
On Fri, May 17, 2013 at 05:12:58AM +0800, Xiao Guangrong wrote: > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > walk and zap all shadow pages one by one, also it need to zap all guest > page's rmap and all shadow page's parent spte list. Particularly, things > become wors

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Thu, May 16, 2013 at 08:40:41PM +0200, Peter Zijlstra wrote: > On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote: > > There are several ways to make sure might_fault > > calling function does not sleep. > > One is to use it on kernel or otherwise locked memory - apparently > > n

Re: [PATCH] KVM/MIPS32: Export min_low_pfn.

2013-05-19 Thread Ralf Baechle
On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > On 05/17/2013 02:06 PM, Sanjay Lal wrote: > >The KVM module uses the standard MIPS cache management routines, which use > >min_low_pfn. > >This creates and indirect dependency, requiring min_low_pfn to be exported. > > > >Signed-off-b

Re: [PATCH 0/8] s390/kvm fixes

2013-05-19 Thread Gleb Natapov
Hi Christian, On Fri, May 17, 2013 at 02:41:30PM +0200, Christian Borntraeger wrote: > Gleb, Paolo, Marcelo, > > here are some low level changes to kvm on s390 that we have been > cooking for a while now. > > Patch "s390/pgtable: fix ipte notify bit" will go via Martins > tree into 3.10, but is

[RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-19 Thread Vadim Rozenfeld
The following patch allows to activate a partition reference time enlightenment that is based on the host platform's support for an Invariant Time Stamp Counter (iTSC). NOTE: This code will survive migration due to lack of VM stop/resume handlers, when offset, scale and sequence should be readjus

[RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-19 Thread Vadim Rozenfeld
Signed-off: Peter Lieven Signed-off: Gleb Natapov Signed-off: Vadim Rozenfeld v1 -> v2 1. mark TSC page dirty as suggested by Eric Northup and Gleb 2. disable local irq when calling get_kernel_ns, as it was done by Peter Lieven 3. move check for TSC page enable from second patch

[RFC PATCH v2 0/2] Hyper-V timers

2013-05-19 Thread Vadim Rozenfeld
This RFC series adds support for two Hyper-V timer services - a per-partition reference time counter, and a partition reference time enlightenment. Vadim Rozenfeld (2): add support for Hyper-V reference time counter add support for Hyper-V invariant TSC arch/x86/include/asm/kvm_host.h|