Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-05-08 Thread Wei Wang
On 05/09/2017 01:40 AM, Michael S. Tsirkin wrote: On Sun, May 07, 2017 at 04:19:28AM +, Wang, Wei W wrote: On 05/06/2017 06:26 AM, Michael S. Tsirkin wrote: On Thu, Apr 27, 2017 at 02:31:49PM +0800, Wei Wang wrote: On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: On Wed, Apr 26, 2017 at

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-05-08 Thread Michael S. Tsirkin
On Sun, May 07, 2017 at 04:19:28AM +, Wang, Wei W wrote: > On 05/06/2017 06:26 AM, Michael S. Tsirkin wrote: > > On Thu, Apr 27, 2017 at 02:31:49PM +0800, Wei Wang wrote: > > > On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: > > > > On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote:

RE: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-05-07 Thread Wang, Wei W
On 05/06/2017 06:26 AM, Michael S. Tsirkin wrote: > On Thu, Apr 27, 2017 at 02:31:49PM +0800, Wei Wang wrote: > > On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: > > > On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: > > > > Hi Michael, could you please give some feedback? > > > I'm s

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-05-05 Thread Michael S. Tsirkin
On Thu, Apr 27, 2017 at 02:31:49PM +0800, Wei Wang wrote: > On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: > > > Hi Michael, could you please give some feedback? > > I'm sorry, I'm not sure feedback on what you are requesting. > Oh

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-26 Thread Wei Wang
On 04/27/2017 07:20 AM, Michael S. Tsirkin wrote: On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: Hi Michael, could you please give some feedback? I'm sorry, I'm not sure feedback on what you are requesting. Oh, just some trivial things (e.g. use a field in the header, hdr->chunks

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-26 Thread Michael S. Tsirkin
On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: > Hi Michael, could you please give some feedback? I'm sorry, I'm not sure feedback on what you are requesting. The interface looks reasonable now, even though there's a way to make it even simpler if we can limit chunk size to 2G (in f

RE: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-26 Thread Wang, Wei W
Hi Michael, could you please give some feedback? On Monday, April 17, 2017 11:35 AM, Wei Wang wrote: > On 04/15/2017 05:38 AM, Michael S. Tsirkin wrote: > > On Fri, Apr 14, 2017 at 04:37:52PM +0800, Wei Wang wrote: > >> On 04/14/2017 12:34 AM, Michael S. Tsirkin wrote: > >>> On Thu, Apr 13, 2017 a

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-16 Thread Wei Wang
On 04/15/2017 05:38 AM, Michael S. Tsirkin wrote: On Fri, Apr 14, 2017 at 04:37:52PM +0800, Wei Wang wrote: On 04/14/2017 12:34 AM, Michael S. Tsirkin wrote: On Thu, Apr 13, 2017 at 05:35:05PM +0800, Wei Wang wrote: So we don't need the bitmap to talk to host, it is just a data structure we ch

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-14 Thread Michael S. Tsirkin
On Fri, Apr 14, 2017 at 04:37:52PM +0800, Wei Wang wrote: > On 04/14/2017 12:34 AM, Michael S. Tsirkin wrote: > > On Thu, Apr 13, 2017 at 05:35:05PM +0800, Wei Wang wrote: > > > > So we don't need the bitmap to talk to host, it is just > > a data structure we chose to maintain lists of pages, righ

Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-14 Thread Wei Wang
On 04/14/2017 12:34 AM, Michael S. Tsirkin wrote: On Thu, Apr 13, 2017 at 05:35:05PM +0800, Wei Wang wrote: So we don't need the bitmap to talk to host, it is just a data structure we chose to maintain lists of pages, right? Right. bitmap is the way to gather pages to chunk. It's only needed in

Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-13 Thread Matthew Wilcox
On Thu, Apr 13, 2017 at 07:34:19PM +0300, Michael S. Tsirkin wrote: > So we don't need the bitmap to talk to host, it is just > a data structure we chose to maintain lists of pages, right? > OK as far as it goes but you need much better isolation for it. > Build a data structure with APIs such as _

Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-13 Thread Michael S. Tsirkin
On Thu, Apr 13, 2017 at 05:35:05PM +0800, Wei Wang wrote: > Add a new feature, VIRTIO_BALLOON_F_BALLOON_CHUNKS, which enables Let's find a better name here. VIRTIO_BALLOON_F_PAGE_CHUNK > the transfer of the ballooned (i.e. inflated/deflated) pages in > chunks to the host. > > The implementation

[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-13 Thread Wei Wang
Add a new feature, VIRTIO_BALLOON_F_BALLOON_CHUNKS, which enables the transfer of the ballooned (i.e. inflated/deflated) pages in chunks to the host. The implementation of the previous virtio-balloon is not very efficient, because the ballooned pages are transferred to the host one by one. Here is