search for: mark_unused_pages

Displaying 13 results from an estimated 13 matches for "mark_unused_pages".

2017 Mar 03
0
[PATCH v7 kernel 5/5] This patch contains two parts:
...igned long req_id) +{ + struct scatterlist sg_in; + unsigned int pos = 0; + struct virtqueue *vq = vb->host_req_vq; + int ret, order; + struct zone *zone = NULL; + bool part_fill = false; + + mutex_lock(&vb->balloon_lock); + + for (order = MAX_ORDER - 1; order >= 0; order--) { + ret = mark_unused_pages(&zone, order, vb->resp_data, + vb->resp_buf_size / sizeof(__le64), + &pos, VIRTIO_BALLOON_CHUNK_SIZE_SHIFT, part_fill); + if (ret == -ENOSPC) { + if (pos == 0) { + void *new_resp_data; + + new_resp_data = kmalloc(2 * vb->resp_buf_size, + GFP_KERNEL); + if (n...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...e_info_item { > + __le64 start_pfn : 52; /* start pfn for the bitmap */ > + __le64 page_shift : 6; /* page shift width, in bytes */ > + __le64 bmap_len : 6; /* bitmap length, in bytes */ > +}; Is 'bmap_len' too short? a 64-byte buffer is a bit tiny. Right? > +static int mark_unused_pages(struct zone *zone, > + unsigned long *unused_pages, unsigned long size, > + int order, unsigned long *pos) > +{ > + unsigned long pfn, flags; > + unsigned int t; > + struct list_head *curr; > + struct page_info_item *info; > + > + if (zone_is_empty(zone)) > + return...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...e_info_item { > + __le64 start_pfn : 52; /* start pfn for the bitmap */ > + __le64 page_shift : 6; /* page shift width, in bytes */ > + __le64 bmap_len : 6; /* bitmap length, in bytes */ > +}; Is 'bmap_len' too short? a 64-byte buffer is a bit tiny. Right? > +static int mark_unused_pages(struct zone *zone, > + unsigned long *unused_pages, unsigned long size, > + int order, unsigned long *pos) > +{ > + unsigned long pfn, flags; > + unsigned int t; > + struct list_head *curr; > + struct page_info_item *info; > + > + if (zone_is_empty(zone)) > + return...
2016 Dec 04
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...e / sizeof(unsigned long), > > + order, &pos); > > FWIW, get_unsued_pages() is a pretty bad name. "get" usually implies > bumping reference counts or consuming something. You're just "recording" > or "marking" them. > Will change to mark_unused_pages(). > > + if (ret == -ENOSPC) { > > + void *new_resp_data; > > + > > + new_resp_data = kmalloc(2 * vb->resp_buf_size, > > + GFP_KERNEL); > > + if (new_resp_data) { > > + kfree(vb->resp_data); > > + vb->resp_data = new_resp_d...
2016 Dec 05
1
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...'s another field that contains an extended bitmap length for when you need long bitmaps. But, as you note, there's no need for it, so it's a matter of trading the extra complexity versus the desire to not habing to change the ABI again for longer (hopefully). >>> +static int mark_unused_pages(struct zone *zone, >>> + unsigned long *unused_pages, unsigned long size, >>> + int order, unsigned long *pos) >>> +{ >>> + unsigned long pfn, flags; >>> + unsigned int t; >>> + struct list_head *curr; >>> + struct page_info_item *inf...
2016 Dec 05
1
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...'s another field that contains an extended bitmap length for when you need long bitmaps. But, as you note, there's no need for it, so it's a matter of trading the extra complexity versus the desire to not habing to change the ABI again for longer (hopefully). >>> +static int mark_unused_pages(struct zone *zone, >>> + unsigned long *unused_pages, unsigned long size, >>> + int order, unsigned long *pos) >>> +{ >>> + unsigned long pfn, flags; >>> + unsigned int t; >>> + struct list_head *curr; >>> + struct page_info_item *inf...
2016 Nov 30
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...,6 +4428,78 @@ void show_free_areas(unsigned int filter) show_swap_cache_info(); } +struct page_info_item { + __le64 start_pfn : 52; /* start pfn for the bitmap */ + __le64 page_shift : 6; /* page shift width, in bytes */ + __le64 bmap_len : 6; /* bitmap length, in bytes */ +}; + +static int mark_unused_pages(struct zone *zone, + unsigned long *unused_pages, unsigned long size, + int order, unsigned long *pos) +{ + unsigned long pfn, flags; + unsigned int t; + struct list_head *curr; + struct page_info_item *info; + + if (zone_is_empty(zone)) + return 0; + + spin_lock_irqsave(&zone->lock, flag...
2016 Dec 21
12
[PATCH v6 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use {pfn|length} to present the page information instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Dec 21
12
[PATCH v6 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use {pfn|length} to present the page information instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2017 Mar 03
10
[PATCH v7 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
Take over this work from Liang. This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 1) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please check patch 0003 for more details about optimization 1). For an idle guest with 8GB RAM, optimization 2) can help shorten the total live migration
2017 Mar 03
10
[PATCH v7 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
Take over this work from Liang. This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 1) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please check patch 0003 for more details about optimization 1). For an idle guest with 8GB RAM, optimization 2) can help shorten the total live migration
2016 Nov 30
8
[PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Nov 30
8
[PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.