[virtio-dev] RE: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-13 Thread Wang, Wei W
On Sunday, March 12, 2017 12:04 PM, Michael S. Tsirkin wrote: > On Sun, Mar 12, 2017 at 01:59:54AM +, Wang, Wei W wrote: > > On 03/11/2017 10:10 PM, Matthew Wilcox wrote: > > > On Sat, Mar 11, 2017 at 07:59:31PM +0800, Wei Wang wrote: > > > > I'm thinking what if the guest needs to transfer

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-11 Thread Michael S. Tsirkin
On Sun, Mar 12, 2017 at 01:59:54AM +, Wang, Wei W wrote: > On 03/11/2017 10:10 PM, Matthew Wilcox wrote: > > On Sat, Mar 11, 2017 at 07:59:31PM +0800, Wei Wang wrote: > > > I'm thinking what if the guest needs to transfer these much physically > > > continuous memory to host:

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-11 Thread Michael S. Tsirkin
On Sat, Mar 11, 2017 at 07:59:31PM +0800, Wei Wang wrote: > On 03/11/2017 01:11 AM, Matthew Wilcox wrote: > > On Fri, Mar 10, 2017 at 05:58:28PM +0200, Michael S. Tsirkin wrote: > > > One of the issues of current balloon is the 4k page size > > > assumption. For example if you free a huge page you

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-11 Thread Michael S. Tsirkin
On Fri, Mar 10, 2017 at 01:25:41PM -0800, Matthew Wilcox wrote: > On Fri, Mar 10, 2017 at 09:35:21PM +0200, Michael S. Tsirkin wrote: > > > bit 0 clear => bits 1-11 encode a page count, bits 12-63 encode a PFN, > > > page size 4k. > > > bit 0 set, bit 1 clear => bits 2-12 encode a page count,

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Michael S. Tsirkin
On Fri, Mar 10, 2017 at 09:11:44AM -0800, Matthew Wilcox wrote: > On Fri, Mar 10, 2017 at 05:58:28PM +0200, Michael S. Tsirkin wrote: > > One of the issues of current balloon is the 4k page size > > assumption. For example if you free a huge page you > > have to split it up and pass 4k chunks to

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Michael S. Tsirkin
On Fri, Mar 10, 2017 at 09:11:44AM -0800, Matthew Wilcox wrote: > On Fri, Mar 10, 2017 at 05:58:28PM +0200, Michael S. Tsirkin wrote: > > One of the issues of current balloon is the 4k page size > > assumption. For example if you free a huge page you > > have to split it up and pass 4k chunks to

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Michael S. Tsirkin
On Fri, Mar 10, 2017 at 07:37:28PM +0800, Wei Wang wrote: > On 03/09/2017 10:14 PM, Matthew Wilcox wrote: > > On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > > > From: Liang Li > > > 1) allocating pages (6.5%) > > > 2) sending PFNs to host (68.3%) > > > 3)

Re: [virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Michael S. Tsirkin
On Fri, Mar 10, 2017 at 06:02:31PM +0800, Wei Wang wrote: > On 03/08/2017 12:01 PM, Michael S. Tsirkin wrote: > > On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > > > From: Liang Li > > > > > > The implementation of the current virtio-balloon is not very > > >

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Wei Wang
On 03/09/2017 10:14 PM, Matthew Wilcox wrote: On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: From: Liang Li 1) allocating pages (6.5%) 2) sending PFNs to host (68.3%) 3) address translation (6.1%) 4) madvise (19%) This patch optimizes step 2) by transfering

Re: [virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-10 Thread Wei Wang
On 03/08/2017 12:01 PM, Michael S. Tsirkin wrote: On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: From: Liang Li The implementation of the current virtio-balloon is not very efficient, because the pages are transferred to the host one by one. Here is the

[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-07 Thread Michael S. Tsirkin
On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > From: Liang Li > > The implementation of the current virtio-balloon is not very > efficient, because the pages are transferred to the host one by one. > Here is the breakdown of the time in percentage spent on each