[PATCH v3 0/7] KVM: MMU: fix release pfn in mmu code

2012-09-21 Thread Xiao Guangrong
Changlog: changes from Avi's comments: - comment for FNAME(fetch) - add annotations (__acquires, __releases) for page_fault_start and page_fault_end changes from Marcelo's comments: - remove mmu_is_invalid - make release noslot pfn path more readable The last patch which introduces

[PATCH v3 1/7] KVM: MMU: fix release noslot pfn

2012-09-21 Thread Xiao Guangrong
We can not directly call kvm_release_pfn_clean to release the pfn since we can meet noslot pfn which is used to cache mmio info into spte Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |6 -- arch/x86/kvm/paging_tmpl.h |6 -- 2 files

[PATCH v3 2/7] KVM: MMU: remove mmu_is_invalid

2012-09-21 Thread Xiao Guangrong
Remove mmu_is_invalid and use is_invalid_pfn instead Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |5 - arch/x86/kvm/paging_tmpl.h |4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH v3 3/7] KVM: MMU: do not release pfn in mmu_set_spte

2012-09-21 Thread Xiao Guangrong
It helps us to cleanup release pfn in the later patches Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 29 ++--- arch/x86/kvm/paging_tmpl.h | 18 -- 2 files changed, 26 insertions(+), 21 deletions(-)

[PATCH v3 4/7] KVM: MMU: cleanup FNAME(page_fault)

2012-09-21 Thread Xiao Guangrong
Let it return emulate state instead of spte like __direct_map Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/paging_tmpl.h | 31 --- 1 files changed, 12 insertions(+), 19 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h

[PATCH v3 5/7] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-09-21 Thread Xiao Guangrong
The only difference between FNAME(update_pte) and FNAME(pte_prefetch) is that the former is allowed to prefetch gfn from dirty logged slot, so introduce a common function to prefetch spte Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/paging_tmpl.h | 58

[PATCH v3 6/7] KVM: MMU: move prefetch_invalid_gpte out of pagaing_tmp.h

2012-09-21 Thread Xiao Guangrong
The function does not depend on guest mmu mode, move it out from paging_tmpl.h Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 36 arch/x86/kvm/paging_tmpl.h | 24 ++-- 2 files changed,

[PATCH v3 7/7] KVM: MMU: introduce page_fault_start/page_fault_end

2012-09-21 Thread Xiao Guangrong
Wrap the common operations into these two functions Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 55 arch/x86/kvm/paging_tmpl.h | 12 - 2 files changed, 40 insertions(+), 27 deletions(-)

Re: [PATCH v4 02/17] target-i386: Add missing kvm bits.

2012-09-21 Thread Igor Mammedov
On Thu, 20 Sep 2012 16:03:17 -0400 Don Slutz d...@cloudswitch.com wrote: Fix duplicate name (kvmclock = kvm_clock2) also. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git

RE: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-21 Thread Hao, Xudong
-Original Message- From: Avi Kivity [mailto:a...@redhat.com] Sent: Thursday, September 20, 2012 5:20 PM To: Hao, Xudong Cc: Marcelo Tosatti; kvm@vger.kernel.org; Zhang, Xiantao Subject: Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU On guest entry: if

Re: [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Richard Davies
Hi Mel, Thank you for this series. I have applied on clean 3.6-rc5 and tested, and it works well for me - the lock contention is (still) gone and isolate_freepages_block is much reduced. Here is a typical test with these patches: # grep -F '[k]' report | head -8 65.20% qemu-kvm

Re: [PATCH v3 1/2] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-09-21 Thread Alexander Graf
On 21.09.2012, at 07:44, Paul Mackerras wrote: This enables userspace to get and set various SPRs (special-purpose registers) using the KVM_[GS]ET_ONE_REG ioctls. With this, userspace can get and set all the SPRs that are part of the guest state, either through the KVM_[GS]ET_REGS ioctls,

[Autotest][PATCH 1/5] Autotest: Add utils for OpenVSwitch patch

2012-09-21 Thread Jiří Župka
ForAllxx: run object method on every object in list ForAll[a,b,c].print() Signed-off-by: Jiří Župka jzu...@redhat.com --- client/shared/base_utils.py | 81 +++--- 1 files changed, 67 insertions(+), 14 deletions(-) diff --git

[Autotest][PATCH 2/5] virt: Adds OpenVSwitch support to virt tests.

2012-09-21 Thread Jiří Župka
When autotest tries add tap to bridge then test recognize if test is bridge is standard linux or OpenVSwitch. And adds some utils for bridge manipulation. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/shared/openvswitch.py | 583 ++

[Autotest][PATCH 3/5] virt: Adds functionality for vms.

2012-09-21 Thread Jiří Župka
Allow creating of machine with tap devices which are not connected to bridge. Add function for fill virtnet object with address. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/tests/virt/virttest/kvm_vm.py |9 + client/tests/virt/virttest/utils_misc.py |3 ++-

[Autotest][PATCH 5/5] virt: Repair import path.

2012-09-21 Thread Jiří Župka
Signed-off-by: Jiří Župka jzu...@redhat.com --- client/tests/virt/kvm/control.parallel|2 +- client/tests/virt/virttest/libvirt_xml.py |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/virt/kvm/control.parallel b/client/tests/virt/kvm/control.parallel

Re: [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
On Fri, Sep 21, 2012 at 10:13:33AM +0100, Richard Davies wrote: Hi Mel, Thank you for this series. I have applied on clean 3.6-rc5 and tested, and it works well for me - the lock contention is (still) gone and isolate_freepages_block is much reduced. Excellent! Here is a typical test

Re: [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Richard Davies
Mel Gorman wrote: I did manage to get a couple which were slightly worse, but nothing like as bad as before. Here are the results: # grep -F '[k]' report | head -8 45.60% qemu-kvm [kernel.kallsyms] [k] clear_page_c 11.26% qemu-kvm [kernel.kallsyms] [k]

Re: [PATCH v3 1/2] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-09-21 Thread Paul Mackerras
On Fri, Sep 21, 2012 at 11:15:51AM +0200, Alexander Graf wrote: On 21.09.2012, at 07:44, Paul Mackerras wrote: +union kvmppc_one_reg { + u32 wval; + u64 dval; Phew. Is this guaranteed to always pad on the right, rather than left? Absolutely (for big-endian targets). A

Re: [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
On Fri, Sep 21, 2012 at 10:17:01AM +0100, Richard Davies wrote: Richard Davies wrote: I did manage to get a couple which were slightly worse, but nothing like as bad as before. Here are the results: # grep -F '[k]' report | head -8 45.60% qemu-kvm [kernel.kallsyms] [k]

Re: [PATCH v3 1/2] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-09-21 Thread Alexander Graf
On 21.09.2012, at 11:52, Paul Mackerras wrote: On Fri, Sep 21, 2012 at 11:15:51AM +0200, Alexander Graf wrote: On 21.09.2012, at 07:44, Paul Mackerras wrote: +union kvmppc_one_reg { + u32 wval; + u64 dval; Phew. Is this guaranteed to always pad on the right, rather than

[PATCH 0/9] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
Hi Andrew, Richard Davies and Shaohua Li have both reported lock contention problems in compaction on the zone and LRU locks as well as significant amounts of time being spent in compaction. This series aims to reduce lock contention and scanning rates to reduce that CPU usage. Richard reported

[PATCH 1/9] Revert mm: compaction: check lock contention first before taking lock

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-check-lock-contention-first-before-taking-lock.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/compaction.c

[PATCH 3/9] Revert mm: compaction: abort compaction loop if lock is contended or run too long

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c | 12 +--- mm/internal.h |2 +- 2 files changed, 6 insertions(+), 8

[PATCH 5/9] mm: compaction: Acquire the zone-lru_lock as late as possible

2012-09-21 Thread Mel Gorman
Compactions migrate scanner acquires the zone-lru_lock when scanning a range of pages looking for LRU pages to acquire. It does this even if there are no LRU pages in the range. If multiple processes are compacting then this can cause severe locking contention. To make matters worse commit

[PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long

2012-09-21 Thread Mel Gorman
From: Shaohua Li s...@fusionio.com Changelog since V2 o Fix BUG_ON triggered due to pages left on cc.migratepages o Make compact_zone_order() require non-NULL arg `contended' Changelog since V1 o only abort the compaction if lock is contended or run too long o Rearranged the code by Andrea

[PATCH 7/9] Revert mm: have order 0 compaction start off where it left

2012-09-21 Thread Mel Gorman
This reverts commit 7db8889a (mm: have order 0 compaction start off where it left) and commit de74f1cc (mm: have order 0 compaction start near a pageblock with free pages). These patches were a good idea and tests confirmed that they massively reduced the amount of scanning but the

[PATCH 6/9] mm: compaction: Acquire the zone-lock as late as possible

2012-09-21 Thread Mel Gorman
Compactions free scanner acquires the zone-lock when checking for PageBuddy pages and isolating them. It does this even if there are no PageBuddy pages in the range. This patch defers acquiring the zone lock for as long as possible. In the event there are no free pages in the pageblock then the

[PATCH 9/9] mm: compaction: Restart compaction from near where it left off

2012-09-21 Thread Mel Gorman
This is almost entirely based on Rik's previous patches and discussions with him about how this might be implemented. Order 0 compaction stops when enough free pages of the correct page order have been coalesced. When doing subsequent higher order allocations, it is possible for compaction to

[PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-21 Thread Mel Gorman
When compaction was implemented it was known that scanning could potentially be excessive. The ideal was that a counter be maintained for each pageblock but maintaining this information would incur a severe penalty due to a shared writable cache line. It has reached the point where the scanning

[PATCH 2/9] Revert mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/compaction.c

[RFC PATCH v3 00/19] ACPI memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
This is v3 of the ACPI memory hotplug functionality. Only x86_64 target is supported for now. Overview: Dimm device layout is modeled with a new qemu command line -dimm id=name,size=sz,node=pxm,populated=on|off The starting physical address for all dimms is calculated automatically from top

[RFC PATCH v3 01/19][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros

2012-09-21 Thread Vasilis Liaskovitis
This allows to extract the beginning, end and name of a Device object. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- tools/acpi_extract.py | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py

[RFC PATCH v3 03/19][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
Extend the DSDT to include methods for handling memory hot-add and hot-remove notifications and memory device status requests. These functions are called from the memory device SSDT methods. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 70

[RFC PATCH v3 04/19][SeaBIOS] acpi: generate hotplug memory devices

2012-09-21 Thread Vasilis Liaskovitis
The memory device generation is guided by qemu paravirt info. Seabios first uses the info to setup SRAT entries for the hotplug-able memory slots. Afterwards, build_memssdt uses the created SRAT entries to generate appropriate memory device objects. One memory device (and corresponding SRAT entry)

[RFC PATCH v3 10/19] fix live-migration when populated=on is missing

2012-09-21 Thread Vasilis Liaskovitis
Live migration works after memory hot-add events, as long as the qemu command line -dimm arguments are changed on the destination host to specify populated=on for the dimms that have been hot-added. If a command-line change has not occured, the destination host does not yet have the corresponding

[RFC PATCH v3 09/19] pc: Add dimm paravirt SRAT info

2012-09-21 Thread Vasilis Liaskovitis
The numa_fw_cfg paravirt interface is extended to include SRAT information for all hotplug-able dimms. There are 3 words for each hotplug-able memory slot, denoting start address, size and node proximity. The new info is appended after existing numa info, so that the fw_cfg layout does not break.

[RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists

2012-09-21 Thread Vasilis Liaskovitis
Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. This patch implements a tail queue to store guest notifications for memory hot-add and hot-remove requests. Guest responses for memory hotplug command on a per-dimm basis can be detected with the new hmp command info memhp or

[RFC PATCH v3 17/19][SeaBIOS] Implement _PS3 method for memory device

2012-09-21 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 15 +++ src/ssdt-mem.dsl |4 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 0d37bbc..8a18770 100644 ---

[RFC PATCH v3 18/19] Implement _PS3 for dimm

2012-09-21 Thread Vasilis Liaskovitis
This will allow us to update dimm state on OSPM-initiated eject operations e.g. with echo 1 /sys/bus/acpi/devices/PNP0C80\:00/eject Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- docs/specs/acpi_hotplug.txt |7 +++ hw/acpi_piix4.c |5 +

[RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map

2012-09-21 Thread Vasilis Liaskovitis
Dimm physical address offsets are calculated automatically and memory map is adjusted accordingly. If a DIMM can fit before the PCI_HOLE_START (currently 0xe000), it will be added normally, otherwise its physical address will be above 4GB. Also create memory bus on i440fx-pcihost device.

[RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries

2012-09-21 Thread Vasilis Liaskovitis
pcimem_start and pcimem64_start are adjusted from srat entries. For this reason, paravirt info (NUMA SRAT entries and number of cpus) need to be read before pci_setup. Imho, this is an ugly code change since SRAT bios tables and number of cpus have to be read earlier. But the advantage is that no

[RFC PATCH v3 16/19] Update dimm state on reset

2012-09-21 Thread Vasilis Liaskovitis
in case of hot-remove failure on a guest that does not implement _OST, the dimm bitmaps in qemu and Seabios show the dimm as unplugged, but the dimm is still present on the qdev/memory bus. To avoid this inconsistency, we set the dimm state to active/hot-plugged on a reset of the associated

[RFC PATCH v3 15/19] Add _OST dimm support

2012-09-21 Thread Vasilis Liaskovitis
This allows qemu to receive notifications from the guest OS on success or failure of a memory hotplug request. The guest OS needs to implement the _OST functionality for this to work (linux-next: http://lkml.org/lkml/2012/6/25/321) This patch also updates dimm bitmap state and hot-remove pending

[RFC PATCH v3 14/19][SeaBIOS] Add _OST dimm method

2012-09-21 Thread Vasilis Liaskovitis
Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 50 ++

[RFC PATCH v3 13/19] balloon: update with hotplugged memory

2012-09-21 Thread Vasilis Liaskovitis
query-balloon and info balloon should report total memory available to the guest. balloon inflate/ deflate can also use all memory available to the guest (initial + hotplugged memory) Ballon driver has been minimaly tested with the patch, please review and test. Caveat: if the guest does not

[RFC PATCH v3 12/19] Implement info memory-total and query-memory-total

2012-09-21 Thread Vasilis Liaskovitis
Returns total physical memory available to guest in bytes, including hotplugged memory. Note that the number reported here may be different from what the guest sees e.g. if the guest has not logically onlined hotplugged memory. This functionality is provided independently of a balloon device,

[RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers

2012-09-21 Thread Vasilis Liaskovitis
A 32-byte register is used to present up to 256 hotplug-able memory devices to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug event through these. Only reads are allowed from these registers. An ACPI hot-remove event but needs to wait for OSPM to eject the device. We use

[RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-21 Thread Vasilis Liaskovitis
Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached to a new bus called DimmBus. This bus is introduced so that we no longer depend on hotplug-capability of main system bus (the main bus does not allow hotplugging). The DimmBus should be attached to a chipset Device (i440fx

[RFC PATCH v3 06/19] Implement -dimm command line option

2012-09-21 Thread Vasilis Liaskovitis
Example: -dimm id=dimm0,size=512M,node=0,populated=off will define a 512M memory slot belonging to numa node 0. When populated=on, a DimmDevice is created and hot-plugged at system startup. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/Makefile.objs |2 +-

[RFC PATCH v3 02/19][SeaBIOS] Add SSDT memory device support

2012-09-21 Thread Vasilis Liaskovitis
Define SSDT hotplug-able memory devices in _SB namespace. The dynamically generated SSDT includes per memory device hotplug methods. These methods just call methods defined in the DSDT. Also dynamically generate a MTFY method and a MEON array of the online/available memory devices. ACPI

[RFC PATCH v3 19/19] alternative: Introduce paravirt interface QEMU_CFG_PCI_WINDOW

2012-09-21 Thread Vasilis Liaskovitis
Qemu already calculates the 32-bit and 64-bit PCI starting offsets based on initial memory and hotplug-able dimms. This info needs to be passed to Seabios for PCI initialization. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- docs/specs/fwcfg.txt |9 +

[RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows

2012-09-21 Thread Vasilis Liaskovitis
Initialize the 32-bit and 64-bit pci starting offsets from values passed in by the qemu paravirt interface QEMU_CFG_PCI_WINDOW. Qemu calculates the starting offsets based on initial memory and hotplug-able dimms. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com ---

[PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-21 Thread Raghavendra K T
In some special scenarios like #vcpu = #pcpu, PLE handler may prove very costly, because there is no need to iterate over vcpus and do unsuccessful yield_to burning CPU. An idea to solve this is: 1) As Avi had proposed we can modify hardware ple_window dynamically to avoid frequent PL-exit.

[PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-09-21 Thread Raghavendra K T
From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When total number of VCPUs of system is less than or equal to physical CPUs, PLE exits become costly since each VCPU can have dedicated PCPU, and trying to find a target VCPU to yield_to just burns time in PLE handler. This patch reduces

[PATCH RFC 2/2] kvm: Be courteous to other VMs in overcommitted scenario in PLE handler

2012-09-21 Thread Raghavendra K T
From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When PLE handler fails to find a better candidate to yield_to, it goes back and does spin again. This is acceptable when we do not have overcommit. But in overcommitted scenarios (especially when we have large number of small guests), it is

Re: [KVM] Guest Debugging Facilities in KVM

2012-09-21 Thread Jan Kiszka
On 2012-09-20 19:17, Dean Pucsek wrote: On 2012-09-19, at 7:45 AM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-09-19 16:38, Avi Kivity wrote: On 09/17/2012 10:36 PM, Dean Pucsek wrote: Hello, For my Masters thesis I am investigating the usage of Intel VT-x and branch tracing in

Re: [PATCH v4 02/17] target-i386: Add missing kvm bits.

2012-09-21 Thread Eduardo Habkost
On Fri, Sep 21, 2012 at 10:39:52AM +0200, Igor Mammedov wrote: On Thu, 20 Sep 2012 16:03:17 -0400 Don Slutz d...@cloudswitch.com wrote: Fix duplicate name (kvmclock = kvm_clock2) also. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c | 12 1

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-09-21 Thread Rik van Riel
On 09/21/2012 08:00 AM, Raghavendra K T wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When total number of VCPUs of system is less than or equal to physical CPUs, PLE exits become costly since each VCPU can have dedicated PCPU, and trying to find a target VCPU to yield_to just

Re: [PATCH v4 02/17] target-i386: Add missing kvm bits.

2012-09-21 Thread Don Slutz
On 09/21/12 08:36, Eduardo Habkost wrote: On Fri, Sep 21, 2012 at 10:39:52AM +0200, Igor Mammedov wrote: On Thu, 20 Sep 2012 16:03:17 -0400 Don Slutz d...@cloudswitch.com wrote: Fix duplicate name (kvmclock = kvm_clock2) also. Signed-off-by: Don Slutz d...@cloudswitch.com ---

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-21 Thread Chegu Vinod
On 9/21/2012 4:59 AM, Raghavendra K T wrote: In some special scenarios like #vcpu = #pcpu, PLE handler may prove very costly, Yes. because there is no need to iterate over vcpus and do unsuccessful yield_to burning CPU. An idea to solve this is: 1) As Avi had proposed we can modify

Re: [PATCH RFC 2/2] kvm: Be courteous to other VMs in overcommitted scenario in PLE handler

2012-09-21 Thread Rik van Riel
On 09/21/2012 08:00 AM, Raghavendra K T wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When PLE handler fails to find a better candidate to yield_to, it goes back and does spin again. This is acceptable when we do not have overcommit. But in overcommitted scenarios (especially

Re: [PATCH RFC 2/2] kvm: Be courteous to other VMs in overcommitted scenario in PLE handler

2012-09-21 Thread Takuya Yoshikawa
On Fri, 21 Sep 2012 17:30:20 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When PLE handler fails to find a better candidate to yield_to, it goes back and does spin again. This is acceptable when we do not have

Re: [PATCH 0/9] Reduce compaction scanning and lock contention

2012-09-21 Thread Rik van Riel
On 09/21/2012 06:46 AM, Mel Gorman wrote: Hi Andrew, Richard Davies and Shaohua Li have both reported lock contention problems in compaction on the zone and LRU locks as well as significant amounts of time being spent in compaction. This series aims to reduce lock contention and scanning rates

Re: [PATCH RFC 2/2] kvm: Be courteous to other VMs in overcommitted scenario in PLE handler

2012-09-21 Thread Rik van Riel
On 09/21/2012 09:46 AM, Takuya Yoshikawa wrote: On Fri, 21 Sep 2012 17:30:20 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When PLE handler fails to find a better candidate to yield_to, it goes back and does spin again.

Re: [PATCH v2 1/1] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-21 Thread Eduardo Habkost
On Thu, Sep 20, 2012 at 04:06:27PM -0400, Don Slutz wrote: From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html EAX should be KVM_CPUID_FEATURES (0x4001) not 0. Added hypervisor-vendor=kvm0 to get the older CPUID result. kvm1 selects the newer one. Why not just make

Re: pci-assign terminates the guest upon pread() / pwrite() error?

2012-09-21 Thread Etienne Martineau
On 09/20/2012 05:13 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 16:36 -0400, Etienne Martineau wrote: On 09/20/2012 03:37 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 15:08 -0400, Etienne Martineau wrote: On 09/20/2012 02:16 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 13:27

Re: pci-assign terminates the guest upon pread() / pwrite() error?

2012-09-21 Thread Alex Williamson
On Fri, 2012-09-21 at 11:17 -0400, Etienne Martineau wrote: On 09/20/2012 05:13 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 16:36 -0400, Etienne Martineau wrote: On 09/20/2012 03:37 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 15:08 -0400, Etienne Martineau wrote: On 09/20/2012

Re: [Xen-users] Recommendations for Virtulization Hardware

2012-09-21 Thread Andrew Bobulsky
(CC'ing Casey on this, as I recommend his setup for an Intel-based solution) Hello ShadesOfGrey, Hehehe, talk about timing ;) On Sep 20, 2012, at 5:15 PM, ShadesOfGrey shades_of_g...@earthlink.net wrote: I'm looking to build a new personal computer. I want it to function as a Linux

[PATCH] vfio: Fix virqfd release race

2012-09-21 Thread Alex Williamson
vfoi-pci supports a mechanism like KVM's irqfd for unmasking an interrupt through an eventfd. There are two ways to shutdown this interface: 1) close the eventfd, 2) ioctl (such as disabling the interrupt). Both of these do the release through a workqueue, which can result in a segfault if two

Re: pci-assign terminates the guest upon pread() / pwrite() error?

2012-09-21 Thread Etienne Martineau
On 09/21/2012 11:49 AM, Alex Williamson wrote: On Fri, 2012-09-21 at 11:17 -0400, Etienne Martineau wrote: On 09/20/2012 05:13 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 16:36 -0400, Etienne Martineau wrote: On 09/20/2012 03:37 PM, Alex Williamson wrote: On Thu, 2012-09-20 at 15:08

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-09-21 Thread Raghavendra K T
On 09/21/2012 06:32 PM, Rik van Riel wrote: On 09/21/2012 08:00 AM, Raghavendra K T wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When total number of VCPUs of system is less than or equal to physical CPUs, PLE exits become costly since each VCPU can have dedicated PCPU, and

Re: [PATCH 1/9] Revert mm: compaction: check lock contention first before taking lock

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:15AM +0100, Mel Gorman wrote: This reverts mm-compaction-check-lock-contention-first-before-taking-lock.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de Acked-by: Rafael Aquini aqu...@redhat.com -- To

Re: [PATCH 2/9] Revert mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:16AM +0100, Mel Gorman wrote: This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de Acked-by: Rafael Aquini aqu...@redhat.com -- To

Re: [PATCH 3/9] Revert mm: compaction: abort compaction loop if lock is contended or run too long

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:17AM +0100, Mel Gorman wrote: This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de Acked-by: Rafael Aquini aqu...@redhat.com --

Re: [PATCH RFC 2/2] kvm: Be courteous to other VMs in overcommitted scenario in PLE handler

2012-09-21 Thread Raghavendra K T
On 09/21/2012 07:22 PM, Rik van Riel wrote: On 09/21/2012 09:46 AM, Takuya Yoshikawa wrote: On Fri, 21 Sep 2012 17:30:20 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: From: Raghavendra K T raghavendra...@linux.vnet.ibm.com When PLE handler fails to find a better candidate to

Re: [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:18AM +0100, Mel Gorman wrote: From: Shaohua Li s...@fusionio.com Changelog since V2 o Fix BUG_ON triggered due to pages left on cc.migratepages o Make compact_zone_order() require non-NULL arg `contended' Changelog since V1 o only abort the compaction if

Re: [PATCH 5/9] mm: compaction: Acquire the zone-lru_lock as late as possible

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:19AM +0100, Mel Gorman wrote: Compactions migrate scanner acquires the zone-lru_lock when scanning a range of pages looking for LRU pages to acquire. It does this even if there are no LRU pages in the range. If multiple processes are compacting then this can cause

Re: [PATCH 6/9] mm: compaction: Acquire the zone-lock as late as possible

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:20AM +0100, Mel Gorman wrote: Compactions free scanner acquires the zone-lock when checking for PageBuddy pages and isolating them. It does this even if there are no PageBuddy pages in the range. This patch defers acquiring the zone lock for as long as possible.

Re: [PATCH 7/9] Revert mm: have order 0 compaction start off where it left

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:21AM +0100, Mel Gorman wrote: This reverts commit 7db8889a (mm: have order 0 compaction start off where it left) and commit de74f1cc (mm: have order 0 compaction start near a pageblock with free pages). These patches were a good idea and tests confirmed that

Re: [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:22AM +0100, Mel Gorman wrote: When compaction was implemented it was known that scanning could potentially be excessive. The ideal was that a counter be maintained for each pageblock but maintaining this information would incur a severe penalty due to a shared

Re: [PATCH 9/9] mm: compaction: Restart compaction from near where it left off

2012-09-21 Thread Rafael Aquini
On Fri, Sep 21, 2012 at 11:46:23AM +0100, Mel Gorman wrote: This is almost entirely based on Rik's previous patches and discussions with him about how this might be implemented. Order 0 compaction stops when enough free pages of the correct page order have been coalesced. When doing

[PATCH v11] kvm: Add resampling irqfds for level triggered interrupts

2012-09-21 Thread Alex Williamson
To emulate level triggered interrupts, add a resample option to KVM_IRQFD. When specified, a new resamplefd is provided that notifies the user when the irqchip has been resampled by the VM. This may, for instance, indicate an EOI. Also in this mode, posting of an interrupt through an irqfd only

Re: [Qemu-devel] [PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-21 Thread Alex Williamson
Ping. There don't seem to be any objections to this. Thanks, Alex On Fri, 2012-09-14 at 17:04 -0600, Alex Williamson wrote: On Fri, 2012-09-14 at 17:01 -0600, Alex Williamson wrote: Same goodness as v4, plus: - Addressed comments by Blue Swirl (thanks for the review) (hopefully

Re: [PATCH v2 1/1] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-21 Thread Don Slutz
On 09/21/12 10:18, Eduardo Habkost wrote: On Thu, Sep 20, 2012 at 04:06:27PM -0400, Don Slutz wrote: From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html EAX should be KVM_CPUID_FEATURES (0x4001) not 0. Added hypervisor-vendor=kvm0 to get the older CPUID result. kvm1

Re: [libvirt] TSC scaling interface to management

2012-09-21 Thread Dor Laor
On 09/21/2012 05:51 AM, Marcelo Tosatti wrote: On Fri, Sep 21, 2012 at 12:02:46AM +0300, Dor Laor wrote: On 09/12/2012 06:39 PM, Marcelo Tosatti wrote: HW TSC scaling is a feature of AMD processors that allows a multiplier to be specified to the TSC frequency exposed to the guest. KVM also

Re: [PATCH v2 1/1] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-21 Thread Don Slutz
On 09/21/12 16:49, Eduardo Habkost wrote: On Fri, Sep 21, 2012 at 04:26:58PM -0400, Don Slutz wrote: On 09/21/12 10:18, Eduardo Habkost wrote: On Thu, Sep 20, 2012 at 04:06:27PM -0400, Don Slutz wrote: From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html EAX should be

Re: [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long

2012-09-21 Thread Andrew Morton
On Fri, 21 Sep 2012 11:46:18 +0100 Mel Gorman mgor...@suse.de wrote: Changelog since V2 o Fix BUG_ON triggered due to pages left on cc.migratepages o Make compact_zone_order() require non-NULL arg `contended' Changelog since V1 o only abort the compaction if lock is contended or run too

Re: [PATCH 6/9] mm: compaction: Acquire the zone-lock as late as possible

2012-09-21 Thread Andrew Morton
On Fri, 21 Sep 2012 11:46:20 +0100 Mel Gorman mgor...@suse.de wrote: Compactions free scanner acquires the zone-lock when checking for PageBuddy pages and isolating them. It does this even if there are no PageBuddy pages in the range. This patch defers acquiring the zone lock for as long as

Re: [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-21 Thread Andrew Morton
On Fri, 21 Sep 2012 11:46:22 +0100 Mel Gorman mgor...@suse.de wrote: When compaction was implemented it was known that scanning could potentially be excessive. The ideal was that a counter be maintained for each pageblock but maintaining this information would incur a severe penalty due to a

Re: [PATCH v2 1/1] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-21 Thread Eduardo Habkost
On Fri, Sep 21, 2012 at 05:28:27PM -0400, Don Slutz wrote: On 09/21/12 16:49, Eduardo Habkost wrote: On Fri, Sep 21, 2012 at 04:26:58PM -0400, Don Slutz wrote: On 09/21/12 10:18, Eduardo Habkost wrote: On Thu, Sep 20, 2012 at 04:06:27PM -0400, Don Slutz wrote: From

Re: [RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists

2012-09-21 Thread Eric Blake
On 09/21/2012 05:17 AM, Vasilis Liaskovitis wrote: Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. This patch implements a tail queue to store guest notifications for memory hot-add and hot-remove requests. Guest responses for memory hotplug command on a per-dimm basis

Re: [RFC PATCH v3 12/19] Implement info memory-total and query-memory-total

2012-09-21 Thread Eric Blake
On 09/21/2012 05:17 AM, Vasilis Liaskovitis wrote: Returns total physical memory available to guest in bytes, including hotplugged memory. Note that the number reported here may be different from what the guest sees e.g. if the guest has not logically onlined hotplugged memory. This

[PATCH v5 00/17] Allow changing of Hypervisor CPUIDs.

2012-09-21 Thread Don Slutz
Also known as Paravirtualization CPUIDs. This is primarily done so that the guest will think it is running under vmware when hypervisor-vendor=vmware is specified as a property of a cpu. This depends on: http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg01400.html As far as I know it is

[PATCH v5 01/17] target-i386: Allow tsc-frequency to be larger then 2.147G

2012-09-21 Thread Don Slutz
The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira folive...@cloudswitch.com Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[PATCH v5 03/17] target-i386: Add Hypervisor level.

2012-09-21 Thread Don Slutz
Also known as Paravirtualization level or maximim cpuid function present in this leaf. This is just the EAX value for 0x4000. QEMU knows this is KVM_CPUID_SIGNATURE (0x4000). This is based on: Microsoft Hypervisor CPUID Leaves:

[PATCH v5 02/17] target-i386: Add missing kvm bits.

2012-09-21 Thread Don Slutz
Fix duplicate name (kvmclock = kvm_clock2) also. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 0313cf5..25ca986 100644 --- a/target-i386/cpu.c +++

[PATCH v5 04/17] target-i386: Add cpu object access routines for Hypervisor level.

2012-09-21 Thread Don Slutz
These are modeled after x86_cpuid_get_xlevel and x86_cpuid_set_xlevel. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[PATCH v5 05/17] target-i386: Add cpu object access routines for Hypervisor level.

2012-09-21 Thread Don Slutz
These are modeled after x86_cpuid_get_xlevel and x86_cpuid_set_xlevel. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c |8 target-i386/cpu.h |2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[PATCH v5 06/17] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-09-21 Thread Don Slutz
Also known as Paravirtualization level. This change is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel change starts with: http://fixunix.com/kernel/538707-use-cpuid-communicate-hypervisor.html

  1   2   >