==
> > Analyze events for all VMs, all VCPUs:
> > VM-EXITSamples Samples% Time%Min TimeMax
> > Time Avg time
> >MSR_WRITE 92404589.96%81.10% 0.42us
> > 68.42us 1.26us ( +- 0.07% )
> >DR_ACC
> >> > Analyze events for all VMs, all VCPUs:
> >> > VM-EXITSamples Samples% Time%Min TimeMax
> >> > Time Avg time
> >> > EXTERNAL_INTERRUPT 47183159.89%68.58% 0.64us
> >> > 65.42us 2.34us ( +- 0.11% )
> >> >MSR_WRITE 2
> > Hi Vitaly,
> >
> > I found a case that the virtualization overhead was almost doubled
> > when turning on Hper-v related features compared to that without any
> > no hyper-v feature. It happens when running a 3D game in windows
> > guest in qemu kvm environment.
> >
> > By investigation, I fou
[resend for missing cc]
Hi Vitaly,
I found a case that the virtualization overhead was almost doubled
when turning on Hper-v related features compared to that without any
no hyper-v feature. It happens when running a 3D game in windows
guest in qemu kvm environment.
By investigation, I found th
> >>> +static int
> >>> +hugepage_reporting_cycle(struct page_reporting_dev_info *prdev,
> >>> + struct hstate *h, unsigned int nid,
> >>> + struct scatterlist *sgl, unsigned int *offset)
> >>> +{
> >>> + struct list_head *list = &h->hugepage_freelists[
> > > > + spin_lock_irq(&hugetlb_lock);
> > > > +
> > > > + if (huge_page_order(h) > MAX_ORDER)
> > > > + budget = HUGEPAGE_REPORTING_CAPACITY;
> > > > + else
> > > > + budget = HUGEPAGE_REPORTING_CAPACITY * 32;
> > >
> > > Wouldn't huge_page_order alwa
> On 12/21/20 11:46 PM, Liang Li wrote:
> > Free page reporting only supports buddy pages, it can't report the
> > free pages reserved for hugetlbfs case. On the other hand, hugetlbfs
> > is a good choice for a system with a huge amount of RAM, because it
> &g
> On 12/22/20 11:59 AM, Alexander Duyck wrote:
> > On Mon, Dec 21, 2020 at 11:47 PM Liang Li
> > wrote:
> >> +
> >> + if (huge_page_order(h) > MAX_ORDER)
> >> + budget = HUGEPAGE_REPORTING_CAPACITY;
> >> + else
>
> > +hugepage_reporting_cycle(struct page_reporting_dev_info *prdev,
> > +struct hstate *h, unsigned int nid,
> > +struct scatterlist *sgl, unsigned int *offset)
> > +{
> > + struct list_head *list = &h->hugepage_freelists[nid];
> > + unsi
> > Free page reporting in virtio-balloon doesn't give you any guarantees
> > regarding zeroing of pages. Take a look at the QEMU implementation -
> > e.g., with vfio all reports are simply ignored.
> >
> > Also, I am not sure if mangling such details ("zeroing of pages") into
> > the page reportin
On Tue, Dec 22, 2020 at 4:28 PM David Hildenbrand wrote:
>
> On 22.12.20 08:48, Liang Li wrote:
> > Free page reporting only supports buddy pages, it can't report the
> > free pages reserved for hugetlbfs case. On the other hand, hugetlbfs
>
> The virtio-balloon
lloon driver, changes for the virtio spec are needed.
Before that, I need the feedback of the comunity about this new feature.
This RFC is baed on my previous series:
'[RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO'
Liang Li (3):
mm: support hugetlb free page reportin
lloon driver, changes for the virtio spec are needed.
Before that, I need the feedback of the comunity about this new feature.
This RFC is baed on my previous series:
'[RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO'
Liang Li (3):
mm: support hugetlb free page reportin
Williamson
Cc: Michael S. Tsirkin
Cc: Jason Wang
Cc: Mike Kravetz
Cc: Liang Li
Signed-off-by: Liang Li
---
mm/page_prezero.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/mm/page_prezero.c b/mm/page_prezero.c
index c8ce720bfc54..dff4e0adf402 100644
--- a/mm
n
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Jason Wang
Cc: Mike Kravetz
Cc: Liang Li
Signed-off-by: Liang Li
---
drivers/virtio/virtio_balloon.c | 61 +
include/uapi/linux/virtio_balloon.h | 1 +
2 files changed, 62 insertions(+)
diff --git a/drivers/v
David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Jason Wang
Cc: Mike Kravetz
Cc: Liang Li
Signed-off-by: Liang Li
---
include/linux/hugetlb.h| 3 +
include/linux/page_reporting.h | 5 +
mm/hugetlb.c | 29 +++
the virtio_balloon driver, changes for the virtio spec are needed.
Before that, I need the feedback of the comunity about this new feature.
Liang Li (3):
mm: support hugetlb free page reporting
virtio-balloon: add support for providing free huge page reports to
host
mm: support f
On Tue, Apr 30, 2019 at 10:35:32AM +, Vladimir Sementsov-Ogievskiy wrote:
> 28.04.2019 13:01, Liang Li wrote:
> > If the backup target is a slow device like ceph rbd, the backup
> > process will affect guest BLK write IO performance seriously,
> > it's cause by the
Eric Blake
Cc: Fam Zheng
Signed-off-by: Liang Li
---
block/backup.c | 117 ++---
1 file changed, 104 insertions(+), 13 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index 9988753249..d436f9e4ee 100644
--- a/block/backup.c
+++ b/bloc
Cc: John Snow
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Wen Congyang
Cc: Xie Changlong
Cc: Markus Armbruster
Cc: Eric Blake
Cc: Fam Zheng
Signed-off-by: Liang Li
---
block/backup.c| 3 ++-
block/replication.c | 2 +-
blockdev.c| 5 +
include/block/block_int.h
Eric Blake
Cc: Fam Zheng
Liang Li (2):
backup: buffer COW request and delay the write operation
qapi: add interface for setting backup cow buffer size
block/backup.c| 118 +-
block/replication.c | 2 +-
blockdev.c
On Tue, Oct 02, 2018 at 01:54:25PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Thu, Sep 27, 2018 at 7:37 PM Liang Li wrote:
> >
> > During live migration, when stopping vhost-user device, 'vhost_dev_stop'
> > will be called, 'vhost_dev_stop'
Concurrent call of multifd_save_cleanup() is unsafe, it will lead to
null pointer dereference. 'multifd_save_cleanup()' should not be called
in multifd_new_send_channel_async(), move it to ram_save_cleanup() like
other features do.
Signed-off-by: Liang Li
---
migration/migra
the vhost user backend failed, the 'CHR_EVENT_CLOSED' event
will be triggerd, followed by the call chain
chr_closed_bh()->vhost_user_stop()->
vhost_net_cleanup()->vhost_dev_cleanup()
vhost_dev_cleanup will clear vhost_dev struct, so the later 'vhost_user_read'
or
the vhost user backend failed, the 'CHR_EVENT_CLOSED' event
will be triggerd, followed by the call chain
chr_closed_bh()->vhost_user_stop()->
vhost_net_cleanup()->vhost_dev_cleanup()
vhost_dev_cleanup will clear vhost_dev struct, so the later 'vhost_user_read'
or
On Mon, Apr 16, 2018 at 11:00:11PM +0800, Lai Jiangshan wrote:
>
> migration/migration.c | 22 ++
> migration/migration.h | 1 +
> migration/ram.c | 27 ++-
> qapi/migration.json | 6 +-
> 4 files changed, 46 insertions(+), 10 deletions(-)
On Tue, Feb 27, 2018 at 06:10:47PM +0800, Wei Wang wrote:
> On 02/27/2018 08:50 AM, Michael S. Tsirkin wrote:
> > On Mon, Feb 26, 2018 at 12:35:31PM +0800, Wei Wang wrote:
> > > On 02/09/2018 08:15 PM, Dr. David Alan Gilbert wrote:
> > > > * Wei Wang (wei.w.w...@intel.com) wrote:
> >
> > I think a
in sync, and the command completes immediately),
we can just improve the documentation to make the force flag obviously
useful.
Cc: Paolo Bonzini
Cc: Jeff Cody
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Eric Blake
Cc: John Snow
Reported-by: Huaitong Han
Signed-off-by: Huaitong Han
Signed-off-by: Liang Li
in sync, and the command completes immediately),
we can just improve the documentation to make the force flag obviously
useful.
Cc: Paolo Bonzini
Cc: Jeff Cody
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Eric Blake
Cc: John Snow
Reported-by: Huaitong Han
Signed-off-by: Huaitong Han
Signed-off-by: Liang Li
On Mon, Feb 05, 2018 at 02:28:55PM -0500, John Snow wrote:
>
>
> On 01/31/2018 09:19 PM, Liang Li wrote:
> > On Tue, Jan 30, 2018 at 03:18:31PM -0500, John Snow wrote:
> >>
> >>
> >> On 01/30/2018 03:38 AM, Liang Li wrote:
> >>> When doing dr
On Tue, Jan 30, 2018 at 03:18:31PM -0500, John Snow wrote:
>
>
> On 01/30/2018 03:38 AM, Liang Li wrote:
>> When doing drive mirror to a low speed shared storage, if there was heavy
>> BLK IO write workload in VM after the 'ready' event, drive mirror block job
&
On Tue, Jan 30, 2018 at 08:20:03AM -0600, Eric Blake wrote:
> On 01/30/2018 02:38 AM, Liang Li wrote:
>> When doing drive mirror to a low speed shared storage, if there was heavy
>> BLK IO write workload in VM after the 'ready' event, drive mirror block job
>> ca
antic.
Cc: Paolo Bonzini
Cc: Jeff Cody
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Eric Blake
Cc: John Snow
Reported-by: Huaitong Han
Signed-off-by: Huaitong Han
Signed-off-by: Liang Li
---
block/mirror.c| 9 +++--
blockdev.c| 4 ++--
blockjob.c|
On Fri, Jan 26, 2018 at 08:04:08AM -0600, Eric Blake wrote:
> On 01/26/2018 12:46 AM, Liang Li wrote:
> > The current QMP command is:
> >
> > { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force':
&g
On Thu, Jan 25, 2018 at 08:48:22AM -0600, Eric Blake wrote:
> On 01/24/2018 10:59 PM, Liang Li wrote:
> >>
> >> There's ongoing work on adding async mirroring; this may be a better
> >> solution to the issue you are seeing.
> >>
> >> https://l
On Wed, Jan 24, 2018 at 01:16:39PM -0600, Eric Blake wrote:
> On 01/24/2018 12:17 AM, Liang Li wrote:
> > We found that when doing drive mirror to a low speed shared storage,
> > if there was heavy BLK IO write workload in VM after the 'ready' event,
> > drive mir
ixed this issue.
Cc: Paolo Bonzini
Cc: Jeff Cody
Cc: Kevin Wolf
Cc: Max Reitz
Signed-off-by: Huaitong Han
Signed-off-by: Liang Li
---
block/mirror.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index c9badc1..3bc49a5 100644
--- a
The .count of HBitmap is forgot to set in function
hbitmap_deserialize_finish, let's set it to the right value.
Cc: Vladimir Sementsov-Ogievskiy
Cc: Fam Zheng
Cc: Max Reitz
Cc: John Snow
Signed-off-by: weiping zhang
Signed-off-by: Liang Li
---
util/hbitmap.c | 1 +
1 file chang
The .count of HBitmap is forgot to set in function
hbitmap_deserialize_finish, let's set it to the right value.
Cc: Vladimir Sementsov-Ogievskiy
Cc: Fam Zheng
Cc: Max Reitz
Cc: John Snow
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Weiping Zhang
Signed-off-by: Lia
unused pages will not be
filtered out in this case.
The current implementation can not work with post copy, if post
copy is enabled, we simply ignore the unused pages. Will make it
work later.
Signed-off-by: Liang Li
---
migration/ram.c | 86
Add a new function to get the vm's max pfn and a new function
to filter out the holes in the undressed free page bitmap to get
a tight free page bitmap. They are implemented on X86 and should
be implemented on other arches for live migration optimization.
Signed-off-by: Liang Li
---
in
Sometimes, it is need to move a portion of bitmap to another place
in a large bitmap, if overlap happens, the bitmap_copy can't not
work correctly, we need a new function to do this work.
Signed-off-by: Liang Li
Reviewed-by: Dr. David Alan Gilbert
---
include/qemu/bitmap.h
ct from vq instead of separate variables.
* Use two separate APIs to request free pages and query the status.
* Changed the virtio balloon interface.
* Addressed some of the comments of v1.
Liang Li (6):
virtio-balloon: update linux head file
virtio-balloon: speed up inflating & def
ned-off-by: Liang Li
---
balloon.c | 47 +++-
hw/virtio/virtio-balloon.c | 149 -
include/hw/virtio/virtio-balloon.h | 18 -
include/sysemu/balloon.h | 18 -
4 files changed, 227 insertions(+), 5
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
---
hw/virtio/vi
Update the linux head file to keep consistent with kernel side.
The new definition will be used in the following patches.
Signed-off-by: Liang Li
---
include/standard-headers/linux/virtio_balloon.h | 34 +
1 file changed, 34 insertions(+)
diff --git a/include/standard
nused
pages, this is very helpful to reduce the network traffic and speed
up the live migration process.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
Cc: Andrea Arcangeli
Cc: David Hilden
new feature, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
hypervisor can get some of guest's runtime information
through this virtual queue too, e.g. the guest's unused page
information, which can be used for live migration optimization.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc
Add a new feature which supports sending the page information
with range array. The current implementation uses PFNs array,
which is not very efficient. Using ranges can improve the
performance of inflating/deflating significantly.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo
pfn|length} down the
road. balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
Cc: Andrea Arcangeli
Cc: David Hildenbrand
---
drivers/virtio/virtio_balloo
ew way to determine the page bitmap size.
* Use a unified way to send the free page information with the bitmap
* Address the issues referred in MST's comments
Liang Li (5):
virtio-balloon: rework deflate to add page to a list
virtio-balloon: define new feature bit and head struct
hypervisor can get some of guest's runtime information
through this virtual queue too, e.g. the guest's unused page
information, which can be used for live migration optimization.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
Cc: P
about the page bitmap. e.g. the page size, page bitmap length and
start pfn.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff
nused
pages, this is very helpful to reduce the network traffic and speed
up the live migration process.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
drivers/virtio/virtio_balloon.c
of the PFN array,
which will allow faster notifications using a bitmap down the road.
balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
driver
d the free page information with the bitmap
* Address the issues referred in MST's comments
Liang Li (5):
virtio-balloon: rework deflate to add page to a list
virtio-balloon: define new feature bit and head struct
virtio-balloon: speed up inflate/deflate process
virtio-balloon: define fla
ation process.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
drivers/virtio/virtio_balloon.c | 128 +---
1 file changed, 121 insertions(+), 7 deletions(-)
diff --git a/drivers/v
hypervisor can get some of guest's runtime information
through this virtual queue too, e.g. the guest's unused page
information, which can be used for live migration optimization.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc
can be corrected by the dirty
page logging mechanism.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
include/linux/mm.h | 2 ++
mm/page_alloc.c| 85
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
Cc: P
Expose the function to get the max pfn, so it can be used in the
virtio-balloon device driver. Simply include the 'linux/bootmem.h'
is not enough, if the device driver is built to a module, directly
refer the max_pfn lead to build failed.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc:
about the page bitmap. e.g. the page size, page bitmap length and
start pfn.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff
che.
* Put some structures to uapi head file.
* Use a new way to determine the page bitmap size.
* Use a unified way to send the free page information with the bitmap
* Address the issues referred in MST's comments
Liang Li (7):
virtio-balloon: rework deflate to add page to a l
of the PFN array,
which will allow faster notifications using a bitmap down the road.
balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
driver
will not be
filtered out in this case.
The current implementation can not work with post copy, if post
copy is enabled, we simply ignore the free pages. Will make it
work later.
Signed-off-by: Liang Li
---
migration/ram.c | 86 +
1 file
Update the new feature bit definition for virtio balloon and
the page bitmap header, request header struct to keep consistent
with kernel side.
Signed-off-by: Liang Li
---
include/standard-headers/linux/virtio_balloon.h | 41 +
1 file changed, 41 insertions(+)
diff
Add a new function to get the vm's max pfn and a new function
to filter out the holes in the undressed free page bitmap to get
a tight free page bitmap. They are implemented on X86 and should
be implemented on other arches for live migration optimization.
Signed-off-by: Liang Li
Reviewed-b
Sometimes, it is need to move a portion of bitmap to another place
in a large bitmap, if overlap happens, the bitmap_copy can't not
work correctly, we need a new function to do this work.
Signed-off-by: Liang Li
---
include/qemu/bitmap.h | 13 +
1 file changed, 13 inser
io balloon interface.
* Addressed some of the comments of v1.
Liang Li (6):
virtio-balloon: update linux head file
virtio-balloon: speed up inflating & deflating process
balloon: get free page info from guest
bitmap: Add a new bitmap_move function
kvm: Add two new arch specific functio
Add a new feature to get the free page information from guest,
the free page information is saved in a bitmap. Please note that
'free page' means page is free sometime after host set the value
of request ID and before it receive response with the same ID.
Signed-off-by: Liang Li
---
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
---
hw/virtio/virtio-balloon.c |
corrected by the dirty
page logging mechanism.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
include/linux/mm.h | 2 ++
mm/page_alloc.c| 84 ++
2
VMM hypervisor can get some
of guest's runtime information through this virtual queue, e.g. the
guest's unused page information, which can be used for live migration
optimization.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
in
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
Cc: P
Support the request for vm's unused page information, response with
a page bitmap. QEMU can make use of this bitmap and the dirty page
logging mechanism to skip the transportation of these unused pages,
this is very helpful to speed up the live migration process.
Signed-off-by: Liang L
Expose the function to get the max pfn, so it can be used in the
virtio-balloon device driver. Simply include the 'linux/bootmem.h'
is not enough, if the device driver is built to a module, directly
refer the max_pfn lead to build failed.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc:
about the page bitmap. e.g. the page size, page bitmap length and
start pfn.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include
ge information with the bitmap
* Address the issues referred in MST's comments
Liang Li (7):
virtio-balloon: rework deflate to add page to a list
virtio-balloon: define new feature bit and page bitmap head
mm: add a function to get the max pfn
virtio-balloon: speed up inflate/d
Will allow faster notifications using a bitmap down the road.
balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
drivers/virtio/virtio_balloon.c
Since there in wrapper around madvise(), the virtio-balloon
code is able to work without the precompiled directive, the
directive can be removed.
Signed-off-by: Liang Li
Suggested-by: Thomas Huth
Reviewd-by: Dr. David Alan Gilbert
---
hw/virtio/virtio-balloon.c | 2 --
1 file changed, 2
Because of commit 11808bb0c422, which remove some condition checks
of 'f->ops->writev_buffer', 'qemu_put_qemu_file' should be enhanced
to clear the 'f_src->iovcnt', or 'f_src->iovcnt' may exceed the
MAX_IOV_SIZE which will break live migra
corrected by the dirty
page logging mechanism.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
include/linux/mm.h | 2 ++
mm/page_alloc.c| 84
Expose the function to get the max pfn, so it can be used in the
virtio-balloon device driver. Simply include the 'linux/bootmem.h'
is not enough, if the device driver is built to a module, directly
refer the max_pfn lead to build failed.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc:
Support the request for vm's unused page information, response with
a page bitmap. QEMU can make use of this bitmap and the dirty page
logging mechanism to skip the transportation of these unused pages,
this is very helpful to speed up the live migration process.
Signed-off-by: Liang L
about the page bitmap. e.g. the page size, page bitmap length and
start pfn.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff
VMM hypervisor can get some
of guest's runtime information through this virtual queue, e.g. the
guest's unused page information, which can be used for live migration
optimization.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: D
Will allow faster notifications using a bitmap down the road.
balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
Cc: Dave Hansen
---
drivers/virtio/virtio_balloon.c
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
Cc: P
page information with the bitmap
* Address the issues referred in MST's comments
Liang Li (7):
virtio-balloon: rework deflate to add page to a list
virtio-balloon: define new feature bit and page bitmap head
mm: add a function to get the max pfn
virtio-balloon: speed up inflate/d
Save the free page info into a page bitmap, will be used in virtio
balloon device driver.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Vlastimil Babka
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
mm/page_alloc.c | 46
VMM hypervisor can get some
of guest's runtime information through this virtual queue, e.g. the
guest's free page information, which can be used for live migration
optimization.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
in
will allow faster notifications using a bitmap down the road.
balloon_pfn_to_page() can be removed because it's useless.
Signed-off-by: Liang Li
Signed-off-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
drivers/virtio/virtio_balloon.c
Support the request for vm's free page information, response with
a page bitmap. QEMU can make use of this free page bitmap to speed
up live migration process by skipping process the free pages.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Andrew Morton
Cc: Vlastimil Babka
Cc
Expose the function to get the max pfn, so it can be used in the
virtio-balloon device driver.
Signed-off-by: Liang Li
Cc: Andrew Morton
Cc: Vlastimil Babka
Cc: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
mm/page_alloc.c | 6 ++
1 file
Changes from v1 to v2:
* Abandon the patch for dropping page cache.
* Put some structures to uapi head file.
* Use a new way to determine the page bitmap size.
* Use a unified way to send the free page information with the bitmap
* Address the issues referred in MST's co
ture, inflating the
balloon to 7GB of a 8GB idle guest only takes 590ms, the
performance improvement is about 85%.
TODO: optimize stage a by allocating/freeing a chunk of pages
instead of a single page at a time.
Signed-off-by: Liang Li
Suggested-by: Michael S. Tsirkin
Cc: Michael S. Tsirkin
Cc: An
about the page bitmap. e.g. the page size, page bitmap length and
start pfn.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include
Add a new feature to get the free page information from guest,
the free page information is saved in a bitmap. Please note that
'free page' means page is free sometime after host set the value
of request ID and before it receive response with the same ID.
Signed-off-by: Liang Li
---
1 - 100 of 332 matches
Mail list logo