Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-31 Thread Wei Wang
On 07/31/2017 12:20 AM, Michael S. Tsirkin wrote: On Sun, Jul 30, 2017 at 07:18:33PM +0300, Michael S. Tsirkin wrote: On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: That's a hypervisor implementation detail. From guest point of view, discarding contents can not be distinguished

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-31 Thread Wei Wang
On 07/31/2017 12:20 AM, Michael S. Tsirkin wrote: On Sun, Jul 30, 2017 at 07:18:33PM +0300, Michael S. Tsirkin wrote: On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: That's a hypervisor implementation detail. From guest point of view, discarding contents can not be distinguished

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Michael S. Tsirkin
On Sun, Jul 30, 2017 at 07:18:33PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: > > On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > > > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > > > On 07/29/2017 07:08 AM,

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Michael S. Tsirkin
On Sun, Jul 30, 2017 at 07:18:33PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: > > On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > > > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > > > On 07/29/2017 07:08 AM,

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Michael S. Tsirkin
On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: > On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Michael S. Tsirkin
On Sun, Jul 30, 2017 at 05:59:17AM +, Wang, Wei W wrote: > On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei

RE: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Wang, Wei W
On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > > > > OK I thought this over. While we might need

RE: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-30 Thread Wang, Wei W
On Sunday, July 30, 2017 12:23 PM, Michael S. Tsirkin wrote: > On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > > > > OK I thought this over. While we might need

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-29 Thread Michael S. Tsirkin
On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > > > OK I thought this over. While we might need these new APIs in > > > > > > the future, I think that at the moment,

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-29 Thread Michael S. Tsirkin
On Sat, Jul 29, 2017 at 08:47:08PM +0800, Wei Wang wrote: > On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: > > On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > > > OK I thought this over. While we might need these new APIs in > > > > > > the future, I think that at the moment,

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-29 Thread Wei Wang
On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: OK I thought this over. While we might need these new APIs in the future, I think that at the moment, there's a way to implement this feature that is significantly simpler. Just add each

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-29 Thread Wei Wang
On 07/29/2017 07:08 AM, Michael S. Tsirkin wrote: On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: OK I thought this over. While we might need these new APIs in the future, I think that at the moment, there's a way to implement this feature that is significantly simpler. Just add each

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Michael S. Tsirkin
On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > OK I thought this over. While we might need these new APIs in > > > > the future, I think that at the moment, there's a way to implement > > > > this feature that is significantly simpler. Just add each s/g > > > > as a separate

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Michael S. Tsirkin
On Thu, Jul 27, 2017 at 10:50:11AM +0800, Wei Wang wrote: > > > > OK I thought this over. While we might need these new APIs in > > > > the future, I think that at the moment, there's a way to implement > > > > this feature that is significantly simpler. Just add each s/g > > > > as a separate

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Michael S. Tsirkin
On Fri, Jul 28, 2017 at 04:25:19PM +0800, Wei Wang wrote: > On 07/12/2017 08:40 PM, Wei Wang wrote: > > Add a new feature, VIRTIO_BALLOON_F_SG, which enables to > > transfer a chunk of ballooned (i.e. inflated/deflated) pages using > > scatter-gather lists to the host. > > > > The implementation

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Michael S. Tsirkin
On Fri, Jul 28, 2017 at 04:25:19PM +0800, Wei Wang wrote: > On 07/12/2017 08:40 PM, Wei Wang wrote: > > Add a new feature, VIRTIO_BALLOON_F_SG, which enables to > > transfer a chunk of ballooned (i.e. inflated/deflated) pages using > > scatter-gather lists to the host. > > > > The implementation

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Wei Wang
On 07/12/2017 08:40 PM, Wei Wang wrote: Add a new feature, VIRTIO_BALLOON_F_SG, which enables to transfer a chunk of ballooned (i.e. inflated/deflated) pages using scatter-gather lists to the host. The implementation of the previous virtio-balloon is not very efficient, because the balloon

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-28 Thread Wei Wang
On 07/12/2017 08:40 PM, Wei Wang wrote: Add a new feature, VIRTIO_BALLOON_F_SG, which enables to transfer a chunk of ballooned (i.e. inflated/deflated) pages using scatter-gather lists to the host. The implementation of the previous virtio-balloon is not very efficient, because the balloon

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-26 Thread Wei Wang
On 07/27/2017 01:02 AM, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 11:48:41AM +0800, Wei Wang wrote: On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-26 Thread Wei Wang
On 07/27/2017 01:02 AM, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 11:48:41AM +0800, Wei Wang wrote: On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2017 at 11:48:41AM +0800, Wei Wang wrote: > On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: > > On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: > > > On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: > > > > On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2017 at 11:48:41AM +0800, Wei Wang wrote: > On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: > > On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: > > > On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: > > > > On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-25 Thread Wei Wang
On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-25 Thread Wei Wang
On 07/23/2017 09:45 AM, Michael S. Tsirkin wrote: On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-22 Thread Michael S. Tsirkin
On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: > On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: > > On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > > > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > > > >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-22 Thread Michael S. Tsirkin
On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: > On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: > > On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > > > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > > > >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-14 Thread Wei Wang
On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there are several issues: - internal wait - forces multiple APIs like kick/kick_sync note how kick_sync can

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-14 Thread Wei Wang
On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there are several issues: - internal wait - forces multiple APIs like kick/kick_sync note how kick_sync can

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > - internal wait - forces multiple APIs like kick/kick_sync > >note how kick_sync can fail but your code never checks

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > - internal wait - forces multiple APIs like kick/kick_sync > >note how kick_sync can fail but your code never checks

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-13 Thread Wei Wang
On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there are several issues: - internal wait - forces multiple APIs like kick/kick_sync note how kick_sync can fail but your code never checks return code - need to re-write the last descriptor - might not work for

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-13 Thread Wei Wang
On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: So the way I see it, there are several issues: - internal wait - forces multiple APIs like kick/kick_sync note how kick_sync can fail but your code never checks return code - need to re-write the last descriptor - might not work for

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei, [auto build test ERROR on linus/master] [also build test ERROR on v4.12 next-20170712] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20170713-074956

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei, [auto build test ERROR on linus/master] [also build test ERROR on v4.12 next-20170712] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20170713-074956

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei, [auto build test WARNING on linus/master] [also build test WARNING on v4.12 next-20170712] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei, [auto build test WARNING on linus/master] [also build test WARNING on v4.12 next-20170712] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > Add a new feature, VIRTIO_BALLOON_F_SG, which enables to > transfer a chunk of ballooned (i.e. inflated/deflated) pages using > scatter-gather lists to the host. > > The implementation of the previous virtio-balloon is not very >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > Add a new feature, VIRTIO_BALLOON_F_SG, which enables to > transfer a chunk of ballooned (i.e. inflated/deflated) pages using > scatter-gather lists to the host. > > The implementation of the previous virtio-balloon is not very >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 09:29:00PM +0800, Wei Wang wrote: > On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > > > index 28b0e96..9f27101 100644 > > > ---

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 09:29:00PM +0800, Wei Wang wrote: > On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > > > index 28b0e96..9f27101 100644 > > > ---

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Wei Wang
On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 28b0e96..9f27101 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -57,8 +57,28 @@ int

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Wei Wang
On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 28b0e96..9f27101 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -57,8 +57,28 @@ int

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > index 28b0e96..9f27101 100644 > --- a/include/linux/virtio.h > +++ b/include/linux/virtio.h > @@ -57,8 +57,28 @@ int virtqueue_add_sgs(struct virtqueue *vq, >

Re: [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > index 28b0e96..9f27101 100644 > --- a/include/linux/virtio.h > +++ b/include/linux/virtio.h > @@ -57,8 +57,28 @@ int virtqueue_add_sgs(struct virtqueue *vq, >

[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Wei Wang
Add a new feature, VIRTIO_BALLOON_F_SG, which enables to transfer a chunk of ballooned (i.e. inflated/deflated) pages using scatter-gather lists to the host. The implementation of the previous virtio-balloon is not very efficient, because the balloon pages are transferred to the host one by one.

[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread Wei Wang
Add a new feature, VIRTIO_BALLOON_F_SG, which enables to transfer a chunk of ballooned (i.e. inflated/deflated) pages using scatter-gather lists to the host. The implementation of the previous virtio-balloon is not very efficient, because the balloon pages are transferred to the host one by one.