Re: [PATCH 2/3] KVM: send IPI to vcpu only when it's in guest mode

2011-01-05 Thread Xiao Guangrong
On 01/05/2011 05:48 PM, Avi Kivity wrote: > On 01/05/2011 11:38 AM, Xiao Guangrong wrote: >> We can interrupt the vcpu only when it's running in guest mode >> to reduce IPI. >> >> It looks like only ia64 and x86 need to send IPI to other vcpus, so >> i only add the implementation of 'vcpu->guest_mo

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Tejun Heo
Hello, On Wed, Jan 05, 2011 at 06:39:19PM +0100, Peter Zijlstra wrote: > On Wed, 2011-01-05 at 19:35 +0200, Avi Kivity wrote: > > > Tejun, why did you end up not using preempt_notifiers in cmwq? > > Because I told him to use explicit function calls because that keeps the > code easier to read.

Re: Disk activity issue...

2011-01-05 Thread Erich Weiler
Yeah, some other folks have suggested that too, but it looks like you need kernel version 2.6.18-199 or higher to run iotop, and CentOS 5.5 only has 2.6.18-192 or something... Guess I need to wait for the kernel to be updated there if I want to use iotop, which sounds like a very cool utility.

Re: Disk activity issue...

2011-01-05 Thread Javier Guerra Giraldez
On Tue, Jan 4, 2011 at 11:19 AM, Erich Weiler wrote: > Thanks for replying!  I was able to figure it out - it was not the fault of > KVM.  One of the guests was running ganglia gmetad which was updating 30,000+ > rrd files every 15 seconds (thus generating load via disk I/O), I didn't spot > th

[PATCH] virtio-pci: add softlinks between virtio and pci

2011-01-05 Thread Michael S. Tsirkin
We sometimes need to map between the virtio device and the given pci device. One such use is OS installer that gets the boot pci device from BIOS and needs to find the relevant block device. Since it can't, installation fails. Supply softlinks between these to make it possible. Signed-off-by: Mic

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Eduardo Habkost
On Wed, Jan 05, 2011 at 08:55:44PM +0200, Michael Goldish wrote: > On 01/05/2011 06:21 PM, Eduardo Habkost wrote: > > By the way, I think we could make _new_context() and _pop_context() part > > of the public interface (i.e. remove the "_" from their names). I see > > @context_aware as just a help

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Michael Goldish
On 01/05/2011 06:21 PM, Eduardo Habkost wrote: > On Wed, Jan 05, 2011 at 06:12:05PM +0200, Avi Kivity wrote: >> It would be nice to make the error context a stack, and to use the >> with statement to manage the stack: >> >> >>with error.context("main test"): >>foo() >>with error

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 19:10 +0200, Avi Kivity wrote: > On 01/04/2011 08:04 PM, Peter Zijlstra wrote: > > This definitely wants to be EXPORT_SYMBOL_GPL() and if it were possible > > I'd make it so only kvm.o could use it. It really sucks that kvm is a > > module. > > Why does it suck? I mean apart

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 19:35 +0200, Avi Kivity wrote: > Tejun, why did you end up not using preempt_notifiers in cmwq? Because I told him to use explicit function calls because that keeps the code easier to read. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/05/2011 07:28 PM, Peter Zijlstra wrote: On Wed, 2011-01-05 at 19:19 +0200, Avi Kivity wrote: > On 01/05/2011 07:15 PM, Peter Zijlstra wrote: > > On Wed, 2011-01-05 at 19:10 +0200, Avi Kivity wrote: > > > On 01/04/2011 08:04 PM, Peter Zijlstra wrote: > > > > This definitely want

[ANNOUNCE] kvm-kmod-2.6.37

2011-01-05 Thread Jan Kiszka
As I somehow missed to role out an -rc version, this kvm-kmod series starts with the final 2.6.37 release. You can download it from http://sourceforge.net/projects/kvm/files/kvm-kmod/2.6.37/kvm-kmod-2.6.37.tar.bz2/download Major KVM changes since kvm-kmod-2.6.36.2: - virtual TSC / kvmclock rewor

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 19:19 +0200, Avi Kivity wrote: > On 01/05/2011 07:15 PM, Peter Zijlstra wrote: > > On Wed, 2011-01-05 at 19:10 +0200, Avi Kivity wrote: > > > On 01/04/2011 08:04 PM, Peter Zijlstra wrote: > > > > This definitely wants to be EXPORT_SYMBOL_GPL() and if it were > > > possible

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Mike Galbraith
On Wed, 2011-01-05 at 18:04 +0100, Peter Zijlstra wrote: > On Wed, 2011-01-05 at 17:57 +0100, Mike Galbraith wrote: > > + p_cfs_rq = cfs_rq_of(pse); > > + local = 1; > > + } > > +#endif > > + > > + /* Tell the scheduler that we'd really like pse to run next.

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/05/2011 07:15 PM, Peter Zijlstra wrote: On Wed, 2011-01-05 at 19:10 +0200, Avi Kivity wrote: > On 01/04/2011 08:04 PM, Peter Zijlstra wrote: > > This definitely wants to be EXPORT_SYMBOL_GPL() and if it were possible > > I'd make it so only kvm.o could use it. It really sucks that kvm

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/04/2011 08:04 PM, Peter Zijlstra wrote: This definitely wants to be EXPORT_SYMBOL_GPL() and if it were possible I'd make it so only kvm.o could use it. It really sucks that kvm is a module. Why does it suck? I mean apart from the "virtualization is crap" song. -- error compiling committ

Re: Role of qemu_fair_mutex

2011-01-05 Thread Avi Kivity
On 01/05/2011 06:44 PM, Anthony Liguori wrote: On 01/04/2011 03:39 PM, Marcelo Tosatti wrote: On Tue, Jan 04, 2011 at 08:17:26AM -0600, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex see

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 17:57 +0100, Mike Galbraith wrote: > + p_cfs_rq = cfs_rq_of(pse); > + local = 1; > + } > +#endif > + > + /* Tell the scheduler that we'd really like pse to run next. */ > + p_cfs_rq->next = pse; > + > + /* We know whether we

Re: FIXED: Re: [Qemu-devel] possible regression in qemu-kvm 0.13.0 (memtest)

2011-01-05 Thread Serge E. Hallyn
Hi, I don't see this patch in the git tree, nor a revert of the buggy commit. Was any decision made on this? thanks, -serge -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: Install a VM into a file or a LV ?

2011-01-05 Thread Ben Beuchler
Take a look at Ganeti. It is designed to do exactly what you describe: HA VMs sharing their LV-backed disks over DRBD. -Ben > I'm new to this list and i hope this is the right list for my question. I > like to create several VM's using KVM on a SLES 11 SP1 host. What is > better/faster ? Inst

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Mike Galbraith
It's Rik's patch to do with whatever he wants (I donated suggestion;), but I took the liberty of cleaning it up a bit, see below. It's essentially the same, but fixes a bug where the caller may have targeted a task in it's thread group etc, but when preemption decision time came, may have preempte

Re: Role of qemu_fair_mutex

2011-01-05 Thread Anthony Liguori
On 01/04/2011 03:39 PM, Marcelo Tosatti wrote: On Tue, Jan 04, 2011 at 08:17:26AM -0600, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function o

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Avi Kivity
On 01/05/2011 06:36 PM, Eduardo Habkost wrote: On Wed, Jan 05, 2011 at 06:21:35PM +0200, Avi Kivity wrote: > btw, you can have a decorator for enclosing an entire function in an > error context: > > @function_error_context('migration test') > def migration_test(...): > ... @con

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Eduardo Habkost
On Wed, Jan 05, 2011 at 06:21:35PM +0200, Avi Kivity wrote: > btw, you can have a decorator for enclosing an entire function in an > error context: > >@function_error_context('migration test') >def migration_test(...): >... @context_aware does that, but it doesn't let you set the

Re: [PATCH v3 00/21] [uq/master] Prepare for more qemu-kvm merging

2011-01-05 Thread Marcelo Tosatti
On Tue, Jan 04, 2011 at 09:32:12AM +0100, Jan Kiszka wrote: > Next round, addressing review comments and new findings: > - new: Flush coalesced mmio buffer on IO window exits > - new: Do not use qemu_fair_mutex in kvm mode > - new: Implicitly clear nmi_injected/pending on reset > - new: Fix !CO

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Alex Williamson
On Wed, 2011-01-05 at 15:26 +, Daniel P. Berrange wrote: > On Wed, Jan 05, 2011 at 05:14:55PM +0200, Avi Kivity wrote: > > On 01/05/2011 04:57 PM, Alex Williamson wrote: > > >A valid argument. I think it could also be argued that the user is > > >providing ownership of the file and writing to

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Alex Williamson
On Wed, 2011-01-05 at 17:14 +0200, Avi Kivity wrote: > On 01/05/2011 04:57 PM, Alex Williamson wrote: > > A valid argument. I think it could also be argued that the user is > > providing ownership of the file and writing to the file is part of the > > low level details of the sysfs rom file API an

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Avi Kivity
On 01/05/2011 06:21 PM, Eduardo Habkost wrote: On Wed, Jan 05, 2011 at 06:12:05PM +0200, Avi Kivity wrote: > It would be nice to make the error context a stack, and to use the > with statement to manage the stack: > > > with error.context("main test"): > foo() > with error.c

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Avi Kivity
On 01/05/2011 06:12 PM, Avi Kivity wrote: On 01/05/2011 05:45 PM, Michael Goldish wrote: In complex tests (KVM) an exception string is often not informative enough and the traceback and source code have to be examined in order to figure out what caused the exception. Context strings are a way

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Eduardo Habkost
On Wed, Jan 05, 2011 at 06:12:05PM +0200, Avi Kivity wrote: > It would be nice to make the error context a stack, and to use the > with statement to manage the stack: > > >with error.context("main test"): >foo() >with error.context("before reboot"): >bar() > > If

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Avi Kivity
On 01/05/2011 05:45 PM, Michael Goldish wrote: In complex tests (KVM) an exception string is often not informative enough and the traceback and source code have to be examined in order to figure out what caused the exception. Context strings are a way for tests to provide information about what

Re: [KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Eduardo Habkost
On Wed, Jan 05, 2011 at 05:45:26PM +0200, Michael Goldish wrote: > In complex tests (KVM) an exception string is often not informative enough and > the traceback and source code have to be examined in order to figure out what > caused the exception. Context strings are a way for tests to provide >

[KVM-AUTOTEST PATCH v2 5/6] [RFC] KVM test: use error.context() in migration_with_file_transfer

2011-01-05 Thread Michael Goldish
This is an example of a case where context information is useful. Signed-off-by: Michael Goldish --- .../kvm/tests/migration_with_file_transfer.py | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/tests/migration_with_file_transfer.py b/cl

[KVM-AUTOTEST PATCH v2 2/6] [RFC] CmdError: remove extra blank line between methods

2011-01-05 Thread Michael Goldish
For consistency with other exception classes, keep just a single blank line between __init__() and __str__(). Signed-off-by: Michael Goldish --- client/common_lib/error.py |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/client/common_lib/error.py b/client/common_lib/erro

[KVM-AUTOTEST PATCH v2 4/6] [RFC] Embed context information in exception strings

2011-01-05 Thread Michael Goldish
Exceptions look for a ._context attribute and embed it in the string returned by __str__(). If the attribute isn't set (or if it's an empty string) nothing is embedded. Signed-off-by: Michael Goldish --- client/common_lib/error.py | 10 +- 1 files changed, 9 insertions(+), 1 deletions

[KVM-AUTOTEST PATCH v2 6/6] [RFC] KVM test: use error.context() in kvm_preprocessing.py

2011-01-05 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 5ce0a3b..e5b8906 100644 --- a/client/tests/kvm/kvm_pr

[KVM-AUTOTEST PATCH v2 1/6] [RFC] Fix Unhandled* exceptions

2011-01-05 Thread Michael Goldish
In recent Python version, when exceptions are unpickled their __init__() method is called again. The parameters passed to __init__() upon unpickling are *self.args. Because the first execution of __init__() sets self.args to something different from the parameters passed to __init__() (by passing

[KVM-AUTOTEST PATCH v2 3/6] [RFC] Introduce exception context strings

2011-01-05 Thread Michael Goldish
In complex tests (KVM) an exception string is often not informative enough and the traceback and source code have to be examined in order to figure out what caused the exception. Context strings are a way for tests to provide information about what they're doing, so that when an exception is raise

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Daniel P. Berrange
On Wed, Jan 05, 2011 at 05:14:55PM +0200, Avi Kivity wrote: > On 01/05/2011 04:57 PM, Alex Williamson wrote: > >A valid argument. I think it could also be argued that the user is > >providing ownership of the file and writing to the file is part of the > >low level details of the sysfs rom file AP

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Avi Kivity
On 01/05/2011 04:57 PM, Alex Williamson wrote: A valid argument. I think it could also be argued that the user is providing ownership of the file and writing to the file is part of the low level details of the sysfs rom file API and should be handled by the user of that API. We basically have 3

Re: Install a VM into a file or a LV ?

2011-01-05 Thread Avi Kivity
On 01/05/2011 04:26 PM, Reeted wrote: On 01/05/2011 02:08 PM, Avi Kivity wrote: My aim is that i want to create a HA-Cluster. For every service (currently 3) i'd like to create a VM. I want to have two hosts/nodes, both running SLES 11 SP1. I want to use DRBD to replicate the File/LV to the

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Alex Williamson
On Wed, 2011-01-05 at 10:57 +0200, Avi Kivity wrote: > On 01/04/2011 08:45 PM, Alex Williamson wrote: > > The PCI sysfs rom file is exposed read-only by default, but we need > > to write to it to enable and disable the ROM around the read. When > > running as root, the code works fine as is, but w

Pass-through an audio card to the virtual machine

2011-01-05 Thread Prasad Joshi
Hello, I was able to pass-through an audio card to the VM. I could see the card connected to the VM, but it seems like it is not working in the VM. I tried passing card to Ubuntu 10.04 and Windows 7 as well. Windows7 detected the hardware as 'High Definition Audio Controller' but shows the device

Re: Install a VM into a file or a LV ?

2011-01-05 Thread Reeted
On 01/05/2011 02:08 PM, Avi Kivity wrote: My aim is that i want to create a HA-Cluster. For every service (currently 3) i'd like to create a VM. I want to have two hosts/nodes, both running SLES 11 SP1. I want to use DRBD to replicate the File/LV to the passive node. Do you thing that's a goo

RE: Install a VM into a file or a LV ?

2011-01-05 Thread Lentes, Bernd
Avi Kivity wrote: > On 01/05/2011 02:27 PM, Lentes, Bernd wrote: > > Hi, > > > > I'm new to this list and i hope this is the right list for > my question. I like to create several VM's using KVM on a > SLES 11 SP1 host. What is better/faster ? > > Logical volumes are faster. > > > Install the V

Re: Install a VM into a file or a LV ?

2011-01-05 Thread Avi Kivity
On 01/05/2011 03:35 PM, Lentes, Bernd wrote: Thanks for the quick answer. Just to be sure: From the host's point of view, the LV has no filesystem and does not have to be mounted ? Correct. You assign it with the command qemu-kvm -drive file=/dev/mapper/volgroupname-lvname,cache=none --

[ANNOUNCE] kvm-kmod-2.6.36.2

2011-01-05 Thread Jan Kiszka
Second and likely last maintenance release for the kvm-kmod-2.6.36 series. I'm working on a 2.6.37 release as well. KVM changes since kvm-kmod-2.6.36.1: - VMX: Fix host userspace gsbase corruption - Correct ordering of ldt reload wrt fs/gs reload - fix information leak to userland - Write prot

Re: Install a VM into a file or a LV ?

2011-01-05 Thread Avi Kivity
On 01/05/2011 02:27 PM, Lentes, Bernd wrote: Hi, I'm new to this list and i hope this is the right list for my question. I like to create several VM's using KVM on a SLES 11 SP1 host. What is better/faster ? Logical volumes are faster. Install the VM into a file or a logical Volume ? If i c

[Question] KVM-MMU TDP & Paging structures

2011-01-05 Thread davidgg
sorry for the subjectless first message 0:-) Hi all I'm a computer science student from germany interested in virtualization technologies and given I have some free time I'd like to dig into kvm modding, maybe even actual development ;-) I've been trying to understand the kvm mmu, with a special

Re: [KVM Clock Synchronization 2/4] Keep TSC synchronized across host suspend

2011-01-05 Thread Marcelo Tosatti
On Tue, Jan 04, 2011 at 06:43:10PM -1000, Zachary Amsden wrote: > On 01/04/2011 05:36 AM, Marcelo Tosatti wrote: > >On Tue, Dec 28, 2010 at 07:38:18PM -1000, Zachary Amsden wrote: > >>During a host suspend, TSC may go backwards, which KVM interprets > >>as an unstable TSC. Technically, KVM should

Install a VM into a file or a LV ?

2011-01-05 Thread Lentes, Bernd
Hi, I'm new to this list and i hope this is the right list for my question. I like to create several VM's using KVM on a SLES 11 SP1 host. What is better/faster ? Install the VM into a file or a logical Volume ? If i chosse to install it into a LV: does the LV needs a Filesystem, and does it ha

Re: KVM clock synchronization

2011-01-05 Thread Marcelo Tosatti
On Tue, Dec 28, 2010 at 07:38:16PM -1000, Zachary Amsden wrote: > A further set of improvements to KVM clock. Now it actually can > stay synchronized on SMP systems with a stable TSC, does not get > destabilized by host suspend, and is resistant to migration. > > I did look a bit into the second

[PATCH 22/21] kvm: x86: Only read/write MSR_KVM_ASYNC_PF_EN if supported

2011-01-05 Thread Jan Kiszka
From: Jan Kiszka If the kernel does not support KVM_CAP_ASYNC_PF, it also does not know about the related MSR. So skip it during state synchronization in that case. Fixes annoying kernel warnings. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 12 ++-- 1 files changed, 10 insertio

[PATCH 11.5/21] Synchronize VCPU states before reset

2011-01-05 Thread Jan Kiszka
From: Jan Kiszka This is required to support keeping VCPU states across a system reset. If we do not read the current state before the reset, cpu_synchronize_all_post_reset may write back incorrect state information. The first user of this will be MCE MSR synchronization which currently works ar

No subject

2011-01-05 Thread davidgg
Hi all I'm a computer science student from germany interested in virtualization technologies and given I have some free time I'd like to dig into kvm modding, maybe even actual development ;-) I've been trying to understand the kvm mmu, with a special regard to paging structures. I'm having a har

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 17:40 +0900, KOSAKI Motohiro wrote: > > > If you are interesting GIL mess and issue, please feel free to ask more. > > > > I suggest looking into an explicit round-robin scheme, where each thread > > adds itself to a queue and an unlock wakes up the first waiter. > > I'm su

Re: [PATCH 3/3] KVM: make make_all_cpus_request() lockless

2011-01-05 Thread Xiao Guangrong
On 01/05/2011 05:54 PM, Avi Kivity wrote: >> +kvm_make_request(req, vcpu); >> cpu = vcpu->cpu; >> if (cpus != NULL&& cpu != -1&& cpu != me&& >> atomic_read(&vcpu->guest_mode)) >> @@ -163,7 +161,7 @@ static bool make_all_cpus_request(struct kvm *kvm, >> unsi

Re: [PATCH 2/3] KVM: send IPI to vcpu only when it's in guest mode

2011-01-05 Thread Xiao Guangrong
On 01/05/2011 05:48 PM, Avi Kivity wrote: >> srcu_read_unlock(&vcpu->kvm->srcu, idx); >> +atomic_set(&vcpu->guest_mode, 1); >> kvm_guest_enter(); > > I think it needs an smp_wmb() (technically x86 needs it too, but x86 is > strongly ordered) .. >> -if (cpus != NULL&

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 11:39 +0900, KOSAKI Motohiro wrote: > After calling pthread_cond_signal(), T1 which cond_signal caller and T2 > which waked start to GIL grab race. But usually T1 is always win because > lock variable is in T1's cpu cache. Why kernel and userland have so much > different resu

Re: [PATCH 3/3] KVM: make make_all_cpus_request() lockless

2011-01-05 Thread Avi Kivity
On 01/05/2011 11:40 AM, Xiao Guangrong wrote: Now, we have 'vcpu->guest_mode' to judge whether need to send ipi to other cpus, this way is very exact, so checking request bit is needless, then we can drop the spinlock let it's collateral Clever. @@ -147,11 +147,9 @@ static bool make_all_cpus_

Re: [PATCH 2/3] KVM: send IPI to vcpu only when it's in guest mode

2011-01-05 Thread Avi Kivity
On 01/05/2011 11:38 AM, Xiao Guangrong wrote: We can interrupt the vcpu only when it's running in guest mode to reduce IPI. It looks like only ia64 and x86 need to send IPI to other vcpus, so i only add the implementation of 'vcpu->guest_mode' in ia64, but i don't know ia64 well, please point ou

Re: [Fwd: Re: [RFC -v3 PATCH 2/3] sched: add yield_to function]

2011-01-05 Thread Peter Zijlstra
On Wed, 2011-01-05 at 00:38 +0100, Tommaso Cucinotta wrote: > Il 04/01/2011 19:15, Dario Faggioli ha scritto: > > > > Forwarded Message > > From: Peter Zijlstra > > To: Rik van Riel > > Cc: Hillf Danton,kvm@vger.kernel.org, > > linux-ker...@vger.kernel.org, Avi Kiviti, Srivatsa >

[PATCH 3/3] KVM: make make_all_cpus_request() lockless

2011-01-05 Thread Xiao Guangrong
Now, we have 'vcpu->guest_mode' to judge whether need to send ipi to other cpus, this way is very exact, so checking request bit is needless, then we can drop the spinlock let it's collateral There is the simple test result of kernbench: before patch: real5m5.100s

[PATCH 2/3] KVM: send IPI to vcpu only when it's in guest mode

2011-01-05 Thread Xiao Guangrong
We can interrupt the vcpu only when it's running in guest mode to reduce IPI. It looks like only ia64 and x86 need to send IPI to other vcpus, so i only add the implementation of 'vcpu->guest_mode' in ia64, but i don't know ia64 well, please point out the right way for me if the implementation is

[PATCH 1/3] KVM: fix rcu usage warning in kvm_arch_vcpu_ioctl_set_sregs()

2011-01-05 Thread Xiao Guangrong
Fix: [ 1001.499596] === [ 1001.499599] [ INFO: suspicious rcu_dereference_check() usage. ] [ 1001.499601] --- .. [ 1001.499633] stack backtrace: [ 1001.499636] Pid: 6035, comm: qemu-system-x8

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/05/2011 11:30 AM, KOSAKI Motohiro wrote: > On 01/05/2011 10:40 AM, KOSAKI Motohiro wrote: > > > On 01/05/2011 04:39 AM, KOSAKI Motohiro wrote: > > > > >On 01/04/2011 08:14 AM, KOSAKI Motohiro wrote: > > > > >>Also, If pthread_cond_signal() call sys_yield_to iml

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread KOSAKI Motohiro
> On 01/05/2011 10:40 AM, KOSAKI Motohiro wrote: > > > On 01/05/2011 04:39 AM, KOSAKI Motohiro wrote: > > > > > On 01/04/2011 08:14 AM, KOSAKI Motohiro wrote: > > > > > > Also, If pthread_cond_signal() call sys_yield_to imlicitly, > > > we can > > > > > > avoid almost Nehalem (and

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/05/2011 10:40 AM, KOSAKI Motohiro wrote: > On 01/05/2011 04:39 AM, KOSAKI Motohiro wrote: > > > On 01/04/2011 08:14 AM, KOSAKI Motohiro wrote: > > > > Also, If pthread_cond_signal() call sys_yield_to imlicitly, we can > > > > avoid almost Nehalem (and other P2P cache arch)

Re: [PATCH v3 12/21] kvm: x86: Drop MCE MSRs write back restrictions

2011-01-05 Thread Jan Kiszka
Am 05.01.2011 09:33, Huang Ying wrote: > On Wed, 2011-01-05 at 16:07 +0800, Jan Kiszka wrote: >> Am 05.01.2011 07:42, Huang Ying wrote: >>> On Tue, 2011-01-04 at 16:32 +0800, Jan Kiszka wrote: From: Jan Kiszka There is no need to restrict writing back MCE MSRs to reset or full

Re: [PATCH v2] device-assignment: chmod the rom file before opening read/write

2011-01-05 Thread Avi Kivity
On 01/04/2011 08:45 PM, Alex Williamson wrote: The PCI sysfs rom file is exposed read-only by default, but we need to write to it to enable and disable the ROM around the read. When running as root, the code works fine as is, but when running de-privileged via libvirt, the fopen("r+") will fail

Re: Role of qemu_fair_mutex

2011-01-05 Thread Avi Kivity
On 01/04/2011 05:43 PM, Anthony Liguori wrote: The fact that the iothread drops the global lock during sleep is a detail that shouldn't affect correctness. The IO thread is absolutely allowed to run for arbitrary periods of time without dropping the qemu mutex. No, it's not, since it will st

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread KOSAKI Motohiro
> On 01/05/2011 04:39 AM, KOSAKI Motohiro wrote: > > > On 01/04/2011 08:14 AM, KOSAKI Motohiro wrote: > > > > Also, If pthread_cond_signal() call sys_yield_to imlicitly, we can > > > > avoid almost Nehalem (and other P2P cache arch) lock unfairness > > > > problem. (probaby creating pthread_

Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

2011-01-05 Thread Avi Kivity
On 01/05/2011 04:39 AM, KOSAKI Motohiro wrote: > On 01/04/2011 08:14 AM, KOSAKI Motohiro wrote: > > Also, If pthread_cond_signal() call sys_yield_to imlicitly, we can > > avoid almost Nehalem (and other P2P cache arch) lock unfairness > > problem. (probaby creating pthread_condattr_setauto

Re: [PATCH v3 12/21] kvm: x86: Drop MCE MSRs write back restrictions

2011-01-05 Thread Huang Ying
On Wed, 2011-01-05 at 16:07 +0800, Jan Kiszka wrote: > Am 05.01.2011 07:42, Huang Ying wrote: > > On Tue, 2011-01-04 at 16:32 +0800, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> There is no need to restrict writing back MCE MSRs to reset or full > >> state updates as setting their values has

Re: [RFC 2/2] KVM, MCE, unpoison memory address across reboot

2011-01-05 Thread Jan Kiszka
Am 05.01.2011 07:45, Huang Ying wrote: > On Fri, 2010-12-31 at 17:10 +0800, Jan Kiszka wrote: >> Am 31.12.2010 06:22, Huang Ying wrote: >>> In Linux kernel HWPoison processing implementation, the virtual >>> address in processes mapping the error physical memory page is marked >>> as HWPoison. So

Re: [PATCH v3 12/21] kvm: x86: Drop MCE MSRs write back restrictions

2011-01-05 Thread Jan Kiszka
Am 05.01.2011 07:42, Huang Ying wrote: > On Tue, 2011-01-04 at 16:32 +0800, Jan Kiszka wrote: >> From: Jan Kiszka >> >> There is no need to restrict writing back MCE MSRs to reset or full >> state updates as setting their values has no side effects. > > Sorry for late. Don't worry. > > The MCE