Re: [RFC PATCH v5 0/8] Make balloon drivers' memory changes known to the rest of the kernel

2022-10-19 Thread Denis V. Lunev via Virtualization
On 10/19/22 12:53, Konstantin Khlebnikov wrote: On Wed, 19 Oct 2022 at 12:57, Alexander Atanasov wrote: Currently balloon drivers (Virtio,XEN, HyperV, VMWare, ...) inflate and deflate the guest memory size but there is no way to know how much the memory size is changed by them.

Re: [RFC PATCH 1/1] drivers/vhost: vhost-blk accelerator for virtio-blk guests

2022-07-26 Thread Denis V. Lunev via Virtualization
On 26.07.2022 16:45, Michael S. Tsirkin wrote: On Mon, Jul 25, 2022 at 11:27:53PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel istead of passing them to Q

Re: [PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-23 Thread Denis V. Lunev
ell, this has been broken since the statistics code > was originally added in 2.6.34. > > Fixes: 9564e138b1f6 ("virtio: Add memory statistics reporting to the balloon > driver (V4)") > Signed-off-by: Arnd Bergmann Reviewed-by: Denis V. Lunev > --- > drivers/virti

[PATCH v2 1/1] virtio: update balloon size in balloon "probe"

2016-09-29 Thread Denis V. Lunev
on size check at the end of the probe to match original behaviour. Signed-off-by: Konstantin Neumoin Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) Changes from v1: - fixed description - removed update_balloon_siz

[PATCH 1/1] update balloon size in balloon "probe"

2016-09-23 Thread Denis V. Lunev
checked the condition before start waiting and started balloon operations if necessary. Right now balloon is not inflated if ballon target is set before the driver is loaded. Signed-off-by: Konstantin Neumoin Signed-off-by: Denis V. Lunev CC: "Michael S. Tsirkin" --- drivers/virtio/virtio

[PATCH 1/1] balloon: stop inflate balloon after oom notification

2016-09-09 Thread Denis V. Lunev
: Konstantin Neumoin Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 4e7003d..253bf05 100644 --- a/drivers/virtio

[PATCH 1/1] balloon: check the number of available pages in leak balloon

2016-07-11 Thread Denis V. Lunev
than taken, and raise a "BUG" in balloon_page_dequeue when page list will be empty. So, the simplest solution would be to check that the number of releases pages is less or equal to the number taken pages. Signed-off-by: Konstantin Neumoin Signed-off-by: Denis V. Lunev CC: Michael

Re: [PATCH 2/2] virtio_balloon: export 'available' memory to balloon statistics

2016-02-23 Thread Denis V. Lunev
On 02/23/2016 06:53 PM, Michael S. Tsirkin wrote: On Tue, Feb 23, 2016 at 06:26:47PM +0300, Denis V. Lunev wrote: On 02/23/2016 06:10 PM, Michael S. Tsirkin wrote: On Tue, Feb 16, 2016 at 06:50:52PM +0300, Denis V. Lunev wrote: From: Igor Redko Add a new field, VIRTIO_BALLOON_S_AVAIL, to

Re: [PATCH 2/2] virtio_balloon: export 'available' memory to balloon statistics

2016-02-23 Thread Denis V. Lunev
On 02/23/2016 06:10 PM, Michael S. Tsirkin wrote: On Tue, Feb 16, 2016 at 06:50:52PM +0300, Denis V. Lunev wrote: From: Igor Redko Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory statistics protocol, corresponding to 'Available' in /proc/meminfo. It indica

[PATCH 1/2] calculate 'available' memory in the separate function

2016-02-16 Thread Denis V. Lunev
patch). Signed-off-by: Igor Redko Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin CC: Andrew Morton --- fs/proc/meminfo.c | 31 +-- include/linux/mm.h | 1 + mm/page_alloc.c| 43 +++ 3

[PATCH 2/2] virtio_balloon: export 'available' memory to balloon statistics

2016-02-16 Thread Denis V. Lunev
Igor Redko Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin CC: Andrew Morton --- drivers/virtio/virtio_balloon.c | 6 ++ include/uapi/linux/virtio_balloon.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c

[PATCH 0/2] export 'available' memory to virtio balloon statistics

2016-02-16 Thread Denis V. Lunev
hestration software to improve memory management of different VMs under overcommit. Signed-off-by: Igor Redko Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin CC: Andrew Morton Igor Redko (2): calculate 'available' memory in the separate function vi

Re: [kvm-unit-tests PATCH] x86: hyperv_synic: Hyper-V SynIC test

2015-11-02 Thread Denis V. Lunev
setup SINT's routing * inject SINT's into destination vCPU by 'hyperv-synic-test-device' * wait for SINT's isr's completion * clear Hyper-V SynIC evt/msg pages and destroy SINT's routing Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V

Re: [Qemu-devel] [PATCH 3/7] linux-headers/kvm: add Hyper-V SynIC irq routing type and struct

2015-10-26 Thread Denis V. Lunev
On 10/26/2015 01:03 PM, Peter Maydell wrote: On 26 October 2015 at 09:50, Andrey Smetanin wrote: Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini CC: Roman

[PATCH 9/9] kvm/x86: Hyper-V kvm exit

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: &q

[PATCH 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
gured SINT, and irq_routing api is extended to support GSI-SINT mapping. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini Changes v2: * do not use posted interrupts

[PATCH 6/9] drivers/hv: share Hyper-V SynIC constants with userspace

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Moved Hyper-V synic contants from guest Hyper-V drivers private header into x86 arch uapi Hyper-V header. Added Hyper-V synic msr's flags into x86 arch uapi Hyper-V header. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: V

[PATCH 7/9] kvm/x86: split ioapic-handled and EOI exit bitmaps

2015-10-16 Thread Denis V. Lunev
y may need to cause vmexits too. To achieve that, introduce a new bitmap dedicated specifically for ioapic-handled vectors, and populate EOI exit bitmap from it for now. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y.

[PATCH 4/9] kvm/irqchip: allow only multiple irqchip routes per GSI

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Any other irq routing types (MSI, S390_ADAPTER, upcoming Hyper-V SynIC) map one-to-one to GSI. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Pao

[PATCH 5/9] kvm/irqchip: kvm_arch_irq_routing_update renaming split

2015-10-16 Thread Denis V. Lunev
pdate mappings for arch-specific irq routing entries (in particular, the upcoming Hyper-V synthetic interrupts). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini --

[PATCH 2/9] kvm/eventfd: factor out kvm_notify_acked_gsi()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Factor out kvm_notify_acked_gsi() helper to iterate over EOI listeners and notify those matching the given gsi. It will be reused in the upcoming Hyper-V SynIC implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC

[PATCH 3/9] kvm/eventfd: add arch-specific set_irq

2015-10-16 Thread Denis V. Lunev
: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini --- include/linux/kvm_host.h | 4 virt/kvm/eventfd.c | 13 - 2 files changed, 16 insertions(+), 1 deletio

[PATCH 1/9] kvm/eventfd: avoid loop inside irqfd_update()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin The loop(for) inside irqfd_update() is unnecessary because any other value for irq_entry.type will just trigger schedule_work(&irqfd->inject). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC

[PATCH v2 0/9] Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini Changes v2: * irqchip/eventfd preparation improvements to support arch specific r

Re: [Qemu-devel] [PATCH 2/2] kvm/x86: Hyper-V kvm exit

2015-10-12 Thread Denis V. Lunev
On 10/12/2015 04:42 PM, Eric Blake wrote: On 10/09/2015 07:39 AM, Denis V. Lunev wrote: From: Andrey Smetanin A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V synic configuraion triggered by guest writing to the s/configuraion/configuration/ Is 'synic'

[PATCH 0/2] Hyper-V synthetic interrupt controller

2015-10-09 Thread Denis V. Lunev
writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini ___ Virtualization mailing list V

[PATCH 2/2] kvm/x86: Hyper-V kvm exit

2015-10-09 Thread Denis V. Lunev
From: Andrey Smetanin A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V synic configuraion triggered by guest writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "

[PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-09 Thread Denis V. Lunev
is extended to support GSI-SINT mapping. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini --- arch/powerpc/kvm/mpic.c | 18 +++ arch/s390/kvm/interrupt.c

Re: [PATCH 0/2] virtio_balloon: do not change memory amount visible via /proc/meminfo

2015-08-31 Thread Denis V. Lunev
On 08/20/2015 12:49 AM, Denis V. Lunev wrote: Though there is a problem in this setup. The end-user and hosting provider have signed SLA agreement in which some amount of memory is guaranted for the guest. The good thing is that this memory will be given to the guest when the guest will really

[PATCH 0/2] virtio_balloon: do not change memory amount visible via /proc/meminfo

2015-08-19 Thread Denis V. Lunev
-by: Denis V. Lunev CC: Michael S. Tsirkin ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH 2/2] virtio_balloon: do not change memory amount visible via /proc/meminfo

2015-08-19 Thread Denis V. Lunev
avoid to call adjust_managed_page_count with VIRTIO_BALLOON_F_DEFLATE_ON_OOM set. Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio

[PATCH 1/2] virtio_ballon: change stub of release_pages_by_pfn

2015-08-19 Thread Denis V. Lunev
and rename it to release_pages_balloon. The function originally takes arrays of pfns and now it takes pointer to struct virtio_ballon. This change is necessary to conditionally call adjust_managed_page_count in the next patch. Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin --- drivers

[RFC PATCH 1/1] mshyperv: fix recognition of Hyper-V guest crash MSR's

2015-07-02 Thread Denis V. Lunev
ead of EDX. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Nick Meier CC: K. Y. Srinivasan CC: Haiyang Zhang --- arch/x86/include/asm/mshyperv.h | 1 + arch/x86/kernel/cpu/mshyperv.c | 1 + drivers/hv/vmbus_drv.c | 4 ++-- 3 files changed, 4 insertions(+), 2

[PATCH 2/2] virtio_balloon: free some memory from balloon on OOM

2014-10-15 Thread Denis V. Lunev
. Allocate virtio feature bit for this: it is not set by default, the the guest will not deflate virtio balloon on OOM without explicit permission from host. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c

[PATCH v3 0/2] shrink virtio baloon on OOM in guest

2014-10-15 Thread Denis V. Lunev
: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH 1/2] virtio_balloon: return the amount of freed memory from leak_balloon()

2014-10-15 Thread Denis V. Lunev
From: Raushaniya Maksudova This value would be useful in the next patch to provide the amount of the freed memory for OOM killer. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 5 - 1 file

Re: [PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-14 Thread Denis V. Lunev
On 14/10/14 13:10, Michael S. Tsirkin wrote: On Tue, Oct 14, 2014 at 10:14:05AM +1030, Rusty Russell wrote: "Michael S. Tsirkin" writes: On Mon, Oct 13, 2014 at 04:02:52PM +1030, Rusty Russell wrote: "Denis V. Lunev" writes: From: Raushaniya Maksudova Excessive virt

[PATCH 1/2] virtio_balloon: return the amount of freed memory from leak_balloon()

2014-10-14 Thread Denis V. Lunev
From: Raushaniya Maksudova This value would be useful in the next patch to provide the amount of the freed memory for OOM killer. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 5 - 1 file

[PATCH v2 0/2] shrink virtio baloon on OOM in guest

2014-10-14 Thread Denis V. Lunev
implementation of virtio_balloon callback, so now leak_balloon() function returns number of freed pages. Patch 2 implements virtio_balloon callback itself. Changes from v1: - minor cosmetic tweaks suggested by rusty@ Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC

[PATCH 2/2] virtio_balloon: free some memory from balloon on OOM

2014-10-14 Thread Denis V. Lunev
-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 48 + 1 file changed, 48 insertions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio

Re: [PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-13 Thread Denis V. Lunev
On 13/10/14 09:32, Rusty Russell wrote: "Denis V. Lunev" writes: From: Raushaniya Maksudova Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory

[PATCH 0/2] shrink virtio baloon on OOM in guest

2014-10-08 Thread Denis V. Lunev
implementation of virtio_balloon callback, so now leak_balloon() function returns number of freed pages. Patch 2 implements virtio_balloon callback itself. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin CC: virtualization@lists.linux

[PATCH 1/2] virtio_balloon: return the amount of freed memory from leak_balloon()

2014-10-08 Thread Denis V. Lunev
From: Raushaniya Maksudova This value would be useful in the next patch to provide the amount of the freed memory for OOM killer. Accessing to vb->num_pfns outside of vb->balloon_lock is wrong and unsafe. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russe

[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-08 Thread Denis V. Lunev
-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Rusty Russell CC: Michael S. Tsirkin CC: virtualization@lists.linux-foundation.org --- drivers/virtio/virtio_balloon.c | 46 + 1 file changed, 46 insertions(+) diff --git a/drivers/virtio