[PATCH v33 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

2018-06-14 Thread Wei Wang
The VIRTIO_BALLOON_F_PAGE_POISON feature bit is used to indicate if the guest is using page poisoning. Guest writes to the poison_val config field to tell host about the page poisoning value that is in use. Suggested-by: Michael S. Tsirkin Signed-off-by: Wei Wang Cc: Michael S. Tsirkin Cc: Mich

[PATCH v33 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules

2018-06-14 Thread Wei Wang
In some usages, e.g. virtio-balloon, a kernel module needs to know if page poisoning is in use. This patch exposes the page_poisoning_enabled function to kernel modules. Signed-off-by: Wei Wang Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Andrew Morton --- mm/page_pois

[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-06-14 Thread Wei Wang
Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the support of reporting hints of guest free pages to host via virtio-balloon. Host requests the guest to report free page hints by sending a command to the guest via setting the VIRTIO_BALLOON_HOST_CMD_FREE_PAGE_HINT bit of the

[PATCH v33 1/4] mm: add a function to get free page blocks

2018-06-14 Thread Wei Wang
This patch adds a function to get free pages blocks from a free page list. The obtained free page blocks are hints about free pages, because there is no guarantee that they are still on the free page list after the function returns. One use example of this patch is to accelerate live migration by

[PATCH v33 0/4] Virtio-balloon: support free page reporting

2018-06-14 Thread Wei Wang
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs.

Re: [PULL] vhost: cleanups and fixes

2018-06-14 Thread Wei Wang
On 06/14/2018 11:01 PM, Nitesh Narayan Lal wrote: Hi Wei, On 06/12/2018 07:05 AM, Wei Wang wrote: On 06/12/2018 09:59 AM, Linus Torvalds wrote: On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin wrote: Maybe it will help to have GFP_NONE which will make any allocation fail if attempted. Lin

Re: [PATCH 0/3] Use sbitmap instead of percpu_ida

2018-06-14 Thread Matthew Wilcox
On Thu, Jun 14, 2018 at 10:06:58PM -0400, Martin K. Petersen wrote: > > Matthew, > > > Removing the percpu_ida code nets over 400 lines of removal. It's not > > as spectacular as deleting an entire architecture, but it's still a > > worthy reduction in lines of code. > > Since most of the chang

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-14 Thread Michael S. Tsirkin
On Thu, Jun 14, 2018 at 12:02:31PM +0200, Cornelia Huck wrote: > So, do you know from the outset that there will be such a coupled > device? I.e., is it a property of the VM definition? > > Can there be a 'prepared' virtio-net device that presents the STANDBY > feature even if there currently is n

Re: [PATCH 0/3] Use sbitmap instead of percpu_ida

2018-06-14 Thread Martin K. Petersen
Matthew, > Removing the percpu_ida code nets over 400 lines of removal. It's not > as spectacular as deleting an entire architecture, but it's still a > worthy reduction in lines of code. Since most of the changes are in scsi or target, should I take this series through my tree? -- Martin K.

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-14 Thread Siwei Liu
Thank you for sharing your thoughts, Cornelia. With questions below, I think you raised really good points, some of which I don't have answer yet and would also like to explore here. First off, I don't want to push the discussion to the extreme at this point, or sell anything about having QEMU man

Re: [PATCH v5 2/3] x86/asm: add _ASM_ARG* constants for argument registers to

2018-06-14 Thread H. Peter Anvin
On 06/14/18 13:59, Nick Desaulniers wrote: > On Thu, Jun 14, 2018 at 1:48 PM H. Peter Anvin wrote: >> >> On 06/13/18 14:05, Nick Desaulniers wrote: >>> From: "H. Peter Anvin" >>> >>> i386 and x86-64 uses different registers for arguments; make them >>> available so we don't have to #ifdef in the

Re: [PATCH v5 2/3] x86/asm: add _ASM_ARG* constants for argument registers to

2018-06-14 Thread H. Peter Anvin
On 06/13/18 14:05, Nick Desaulniers wrote: > From: "H. Peter Anvin" > > i386 and x86-64 uses different registers for arguments; make them > available so we don't have to #ifdef in the actual code. > > Native size and specified size (q, l, w, b) versions are provided. > > Suggested-by: Sedat Dil

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-14 Thread Michael S. Tsirkin
On Wed, Jun 13, 2018 at 06:02:01PM -0700, Siwei Liu wrote: > >> And it's the guest that needs failover support not the VM. > > > > > > Isn't guest and VM synonymous? Guest is whatever software is running on top of the hypervisor. The virtual machine is the interface between the two. -- MST

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-14 Thread Cornelia Huck
I've been pointed to this discussion (which I had missed previously) and I'm getting a headache. Let me first summarize how I understand how this feature is supposed to work, then I'll respond to some individual points. The basic idea is to enable guests to migrate seamlessly, while still making i