Re: [virtio-dev] [RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-16 Thread teawater
> 2020年7月16日 18:45,Michael S. Tsirkin 写道: > > On Thu, Jul 16, 2020 at 03:01:18PM +0800, teawater wrote: >> >> >>> 2020年7月16日 14:38,Michael S. Tsirkin 写道: >>> >>> On Thu, Jul 16, 2020 at 10:41:50AM +0800, Hui Zhu wrote: >>>>

Re: [RFC for Linux v4 1/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES and inflate_cont_vq

2020-07-16 Thread teawater
e? > Could you write up something about it? Continuous pages are report by num_pfns and pfns in virtio_balloon too. The function to set pfns is set_page_pfns_size in https://github.com/teawater/linux/blob/balloon_conts/drivers/virtio/virtio_balloon.c#L221 static void set_page_pfns_siz

Re: [virtio-dev] [RFC for qemu v4 2/2] virtio_balloon: Add dcvq to deflate continuous pages

2020-07-16 Thread teawater
> 2020年7月16日 14:39,Michael S. Tsirkin 写道: > > On Thu, Jul 16, 2020 at 10:41:55AM +0800, Hui Zhu wrote: >> This commit adds a vq dcvq to deflate continuous pages. >> When VIRTIO_BALLOON_F_CONT_PAGES is set, try to get continuous pages >> from icvq and use madvise MADV_WILLNEED with the pages.

Re: [virtio-dev] [RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-16 Thread teawater
t; // This is the THP number after this operation. >> cat /proc/meminfo | grep AnonHugePages: >> AnonHugePages:907264 kB These lines are from host. > > I'm a bit confused about which of the above run within guest, > and which run within host. Could you explain pls? >

Re: [PATCH for Linux v2] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-04-09 Thread teawater
> 2020年3月26日 15:17,Michael S. Tsirkin 写道: > > First, either QEMU or Linux version of any interface changes > should be copied to the virtio TC. > > : OK. > > > On Mon, Mar 23, 2020 at 12:04:56AM +0800, Hui Zhu wrote: >> The first version is in [1]. >> According to the comments from

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-04-02 Thread teawater
> 2020年3月31日 22:07,Michael S. Tsirkin 写道: > > On Tue, Mar 31, 2020 at 04:03:18PM +0200, David Hildenbrand wrote: >> On 31.03.20 15:37, Michael S. Tsirkin wrote: >>> On Tue, Mar 31, 2020 at 03:32:05PM +0200, David Hildenbrand wrote: On 31.03.20 15:24, Michael S. Tsirkin wrote: > On

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-04-01 Thread teawater
> 2020年4月1日 17:48,David Hildenbrand 写道: > > On 31.03.20 18:37, Nadav Amit wrote: >>> On Mar 31, 2020, at 7:09 AM, David Hildenbrand wrote: >>> >>> On 31.03.20 16:07, Michael S. Tsirkin wrote: On Tue, Mar 31, 2020 at 04:03:18PM +0200, David Hildenbrand wrote: > On 31.03.20 15:37,

Re: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-26 Thread teawater
Ping. Thanks, Hui > 2020年3月23日 00:04,Hui Zhu 写道: > > If the guest kernel has many fragmentation pages, use virtio_balloon > will split THP of QEMU when it calls MADV_DONTNEED madvise to release > the balloon pages. > Set option cont-pages to on will open flags VIRTIO_BALLOON_VQ_INFLATE_CONT >

Re: [PATCH for Linux v2] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-03-26 Thread teawater
Ping. Thanks, Hui > 2020年3月23日 00:04,Hui Zhu : > > The first version is in [1]. > According to the comments from Michael and David, I updated the patch. > 1. Added a separate vq inflate_cont_vq to transport inflate continuous > pages. > 2. Set all the pages in the continuous pages movable

Re: [RFC for QEMU] virtio-balloon: Add option thp-order to set VIRTIO_BALLOON_F_THP_ORDER

2020-03-17 Thread teawater
> 2020年3月12日 16:25,Michael S. Tsirkin 写道: > > On Thu, Mar 12, 2020 at 03:49:55PM +0800, Hui Zhu wrote: >> If the guest kernel has many fragmentation pages, use virtio_balloon >> will split THP of QEMU when it calls MADV_DONTNEED madvise to release >> the balloon pages. >> Set option thp-order