> > > Please don't use this email address for me anymore. Either use
> > > alexander.du...@gmail.com or alexanderdu...@fb.com. I am getting
> > > bounces when I reply to this thread because of the old address.
> >
> > No problem.
> >
> > > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > > > index eb
On Fri, Jan 8, 2021 at 6:04 AM Mike Kravetz wrote:
>
> On 1/5/21 7:49 PM, Liang Li wrote:
> > hugetlb manages its page in hstate's free page list, not in buddy
> > system, this patch try to make it works for hugetlbfs. It canbe
> > used for memory overcommit in virtua
> >> On Tue 05-01-21 22:49:21, Liang Li wrote:
> >>> hugetlb manages its page in hstate's free page list, not in buddy
> >>> system, this patch try to make it works for hugetlbfs. It canbe
> >>> used for memory overcommit in virtualization and hug
> > Page reporting isolates free pages temporarily when reporting
> > free pages information. It will reduce the actual free pages
> > and may cause application failed for no enough available memory.
> > This patch try to solve this issue, when there is no free page
> > and page repoting is on goin
On Thu, Jan 7, 2021 at 12:08 AM Michal Hocko wrote:
>
> On Tue 05-01-21 22:49:21, Liang Li wrote:
> > hugetlb manages its page in hstate's free page list, not in buddy
> > system, this patch try to make it works for hugetlbfs. It canbe
> > used for memory overcommit
> > enum {
> > PAGE_REPORTING_IDLE = 0,
> > @@ -44,7 +45,7 @@ __page_reporting_request(struct page_reporting_dev_info
> > *prdev)
> > * now we are limiting this to running no more than once every
> > * couple of seconds.
> > */
> > - schedule_delayed_work(
> So you are going to need a lot more explanation for this. Page
> reporting already had the concept of batching as you could only scan
> once every 2 seconds as I recall. Thus the "PAGE_REPORTING_DELAY". The
> change you are making doesn't make any sense without additional
> context.
The reason f
On Wed, Jan 6, 2021 at 5:41 PM David Hildenbrand wrote:
>
> On 06.01.21 04:46, Liang Li wrote:
> > A typical usage of hugetlbfs it's to reserve amount of memory
> > during the kernel booting stage, and the reserved pages are
> > unlikely to return to the buddy
Williamson
Cc: Michael S. Tsirkin
Cc: Jason Wang
Cc: Liang Li
Signed-off-by: Liang Li
---
include/linux/page-flags.h | 12 ++
mm/Kconfig | 10 ++
mm/huge_memory.c | 3 +-
mm/hugetlb.c | 243 +
mm/memory.c
patch add support for reporting free hugepage to
host when guest use hugetlbfs.
Cc: Alexander Duyck
Cc: Mel Gorman
Cc: Andrea Arcangeli
Cc: Dan Williams
Cc: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Liang Li
Signe
n
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Liang Li
Signed-off-by: Liang Li
---
include/linux/hugetlb.h| 3 +
include/linux/page_reporting.h | 4 +
mm/Kconfig | 1 +
mm/huge
done.
Cc: Alexander Duyck
Cc: Mel Gorman
Cc: Andrea Arcangeli
Cc: Dan Williams
Cc: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Liang Li
Signed-off-by: Liang Li
---
include/linux/hugetlb.h | 2 ++
mm/hugetlb.c
Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Liang Li
Signed-off-by: Liang Li
---
drivers/virtio/virtio_balloon.c | 3 +++
include/linux/page_reporting.h | 3 +++
mm/page_reporting.c | 13 +
mm/page_reporting.h
other threshold to control the
waking up of reporting worker.
Cc: Alexander Duyck
Cc: Mel Gorman
Cc: Andrea Arcangeli
Cc: Dan Williams
Cc: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Cc: Liang Li
Signed-off-by: Lia
about side effect of the 'buddy
free page pre zero out' feature brings, I remove it from this
serier.
Liang Li (6):
mm: Add batch size for free page reporting
mm: let user decide page reporting option
hugetlb: add free page reporting support
hugetlb: avoid allocation failed w
> >> That‘s mostly already existing scheduling logic, no? (How many vms can I
> >> put onto a specific machine eventually)
> >
> > It depends on how the scheduling component is designed. Yes, you can put
> > 10 VMs with 4C8G(4CPU, 8G RAM) on a host and 20 VMs with 2C4G on
> > another one. But if o
On Tue, Jan 5, 2021 at 5:30 PM David Hildenbrand wrote:
>
> On 05.01.21 10:20, Michal Hocko wrote:
> > On Mon 04-01-21 15:00:31, Dave Hansen wrote:
> >> On 1/4/21 12:11 PM, David Hildenbrand wrote:
> Yeah, it certainly can't be the default, but it *is* useful for
> thing where we know th
> >>> In our production environment, there are three main applications have such
> >>> requirement, one is QEMU [creating a VM with SR-IOV passthrough device],
> >>> anther other two are DPDK related applications, DPDK OVS and SPDK vhost,
> >>> for best performance, they populate memory when starti
On Mon, Jan 4, 2021 at 8:56 PM Michal Hocko wrote:
>
> On Mon 21-12-20 11:25:22, Liang Li wrote:
> [...]
> > Security
> >
> > This is a weak version of "introduce init_on_alloc=1 and init_on_free=1
> > boot options", which zero out page in a asy
> > Win or not depends on its effect. For our case, it solves the issue
> > that we faced, so it can be thought as a win for us. If others don't
> > have the issue we faced, the result will be different, maybe they will
> > be affected by the side effect of this feature. I think this is your
> > c
> >>> +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 Wed, Dec 23, 2020 at 4:41 PM David Hildenbrand wrote:
>
> [...]
>
> >> I was rather saying that for security it's of little use IMHO.
> >> Application/VM start up time might be improved by using huge pages (and
> >> pre-zeroing these). Free page reporting might be improved by using
> >> MADV_FR
> 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
> > =
> > QEMU use 4K pages, THP is off
> > round1 round2 round3
> > w/o this patch:23.5s 24.7s 24.6s
> > w/ this patch: 10.2s 10.3s 11.2s
> >
> > QEMU use 4K pages, THP is on
> >
https://static.sched.com/hosted_files/kvmforum2020/51/The%20Practice%20Method%20to%20Speed%20Up%2010x%20Boot-up%20Time%20for%20Guest%20in%20Alibaba%20Cloud.pdf
> >
> > and the flowing link is mine:
> > https://static.sched.com/hosted_files/kvmforum2020/90/Speed%20Up%20Creation%20of%20a%20VM%20With%
> > 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
On Tue, Dec 22, 2020 at 4:47 PM David Hildenbrand wrote:
>
> On 21.12.20 17:25, Liang Li wrote:
> > The first version can be found at: https://lkml.org/lkml/2020/4/12/42
> >
> > Zero out the page content usually happens when allocating pages with
> > the flag
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
configuring a large batch size to reduce cache
pollution.
To make the whole function works, support of pre zero out free huge pages
should be added for hugetlbfs, I will send another patch for it.
Liang Li (4):
mm: let user decide page reporting option
mm: pre zero out free pages to speed up p
Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Signed-off-by: Liang Li
---
drivers/virtio/virtio_balloon.c | 3 +++
include/linux/page_reporting.h | 3 +++
mm/page_reporting.c | 18 ++
mm/page_reporting.h
: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Signed-off-by: Liang Li
---
include/linux/highmem.h| 31 +++-
include/linux/page-flags.h | 16 +-
include/trace/events/mmflags.h | 7 +
mm/Kconfig
reshold to control the
waking up of reporting worker.
Cc: Alexander Duyck
Cc: Mel Gorman
Cc: Andrea Arcangeli
Cc: Dan Williams
Cc: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Signed-off-by: Liang Li
---
mm/page_reporting.c |
dicly
and cup was yielded voluntarily if needed.
Cc: Alexander Duyck
Cc: Mel Gorman
Cc: Andrea Arcangeli
Cc: Dan Williams
Cc: Dave Hansen
Cc: David Hildenbrand
Cc: Michal Hocko
Cc: Andrew Morton
Cc: Alex Williamson
Cc: Michael S. Tsirkin
Signed-off-by: Liang Li
---
This patch exposes 5 level page table feature to the VM,
at the same time, the canonical virtual address checking is
extended to support both 48-bits and 57-bits address width,
it's the prerequisite to support 5 level paging guest.
Signed-off-by: Liang Li
Cc: Thomas Gleixner
Cc: Ingo Molna
once the hardware supports, and this is not a good choice because
5 level EPT requires more memory access comparing to use 4 level EPT.
The right thing is to use 5 level EPT only when it's needed, will
change in the future version.
Signed-off-by: Liang Li
Cc: Thomas Gleixner
Cc: Ingo Molna
Now we have 4 level page table and 5 level page table in 64 bits
long mode, let's rename the PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL,
then we can use PT64_ROOT_5LEVEL for 5 level page table, it's
helpful to make the code more clear.
Signed-off-by: Liang Li
Cc: Thomas Gleixner
Cc: Ingo
Signed-off-by: Liang Li
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Kirill A. Shutemov
Cc: Dave Hansen
Cc: Xiao Guangrong
Cc: Paolo Bonzini
Cc: "Radim Kr??m"
---
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/include/uapi/asm/processor-flags.h | 2 ++
2 files changed, 3
enabling
5 level page table, with both the EPT and shadow page support. I just
covered the booting process, the guest can boot successfully.
Some parts of this patchset can be improved. Any comments on the design
or the patches would be appreciated.
Liang Li (4):
x86: Add the new CPUID and CR4
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Cc: Dave Hansen
---
include/uapi/linux/virtio_balloon.h | 19 +++
1 file changed, 19 insertions(+)
diff
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
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: An
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
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
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
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
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
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
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
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
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: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
mm/page_alloc.c | 6 ++
1 file changed, 6 insertions
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: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit
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 comments
Lia
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
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
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
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: Mel Gorman
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
mm/page_alloc.c | 46
Save the free page info into a page bitmap, will be used in virtio
balloon device driver.
Signed-off-by: Liang Li
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Cc: Cornelia Huck
Cc: Amit Shah
---
mm/page_alloc.c | 40
1 file changed, 40 insertions
1 - 100 of 135 matches
Mail list logo