Displaying 20 results from an estimated 43 matches for "sg_in".
2016 Jul 27
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...#39;re not using are enqueued
* at vb_dev_info->pages list.
@@ -373,6 +378,49 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(available));
}
+static void update_free_pages_stats(struct virtio_balloon *vb,
+ unsigned long req_id)
+{
+ struct scatterlist sg_in, sg_out;
+ unsigned long pfn = 0, bmap_len, max_pfn;
+ struct virtqueue *vq = vb->misc_vq;
+ struct balloon_bmap_hdr *hdr = vb->bmap_hdr;
+ int ret = 1;
+
+ max_pfn = get_max_pfn();
+ mutex_lock(&vb->balloon_lock);
+ while (pfn < max_pfn) {
+ memset(vb->page_bitmap, 0, vb->bm...
2016 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...'re not using are enqueued
* at vb_dev_info->pages list.
@@ -552,6 +554,63 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(available));
}
+static void send_unused_pages_info(struct virtio_balloon *vb,
+ unsigned long req_id)
+{
+ struct scatterlist sg_in;
+ unsigned long pfn = 0, bmap_len, pfn_limit, last_pfn, nr_pfn;
+ struct virtqueue *vq = vb->req_vq;
+ struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr;
+ int ret = 1, used_nr_bmap = 0, i;
+
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_PAGE_BITMAP) &&
+ vb->nr_page_bm...
2017 Mar 16
0
[PATCH kernel v8 4/4] virtio-balloon: VIRTIO_BALLOON_F_HOST_REQ_VQ
...= cpu_to_le16(req_id);
+ if (!done)
+ hdr->flag = BALLOON_FLAG_CONT;
+ else
+ hdr->flag = BALLOON_FLAG_DONE;
+
+ if (pos > 0 || done)
+ send_resp_data(vb, vq, true);
+
+}
+
+static void send_unused_pages(struct virtio_balloon *vb,
+ unsigned 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 = record_unused_pages(&zone, order, vb->res...
2016 Mar 03
2
[RFC kernel 0/2]A PV solution for KVM live migration optimization
The current QEMU live migration implementation mark the all the
guest's RAM pages as dirtied in the ram bulk stage, all these pages
will be processed and that takes quit a lot of CPU cycles.
>From guest's point of view, it doesn't care about the content in free
pages. We can make use of this fact and skip processing the free
pages in the ram bulk stage, it can save a lot CPU cycles
2016 Mar 03
2
[RFC kernel 0/2]A PV solution for KVM live migration optimization
The current QEMU live migration implementation mark the all the
guest's RAM pages as dirtied in the ram bulk stage, all these pages
will be processed and that takes quit a lot of CPU cycles.
>From guest's point of view, it doesn't care about the content in free
pages. We can make use of this fact and skip processing the free
pages in the ram bulk stage, it can save a lot CPU cycles
2016 Nov 30
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...'re not using are enqueued
* at vb_dev_info->pages list.
@@ -551,6 +555,58 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(available));
}
+static void send_unused_pages_info(struct virtio_balloon *vb,
+ unsigned long req_id)
+{
+ struct scatterlist sg_in;
+ unsigned long pos = 0;
+ struct virtqueue *vq = vb->req_vq;
+ struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr;
+ int ret, order;
+
+ mutex_lock(&vb->balloon_lock);
+
+ for (order = MAX_ORDER - 1; order >= 0; order--) {
+ pos = 0;
+ ret = get_unused_pages(vb->resp_data,
+...
2017 Mar 03
0
[PATCH v7 kernel 5/5] This patch contains two parts:
...AGES;
+ hdr->id = req_id;
+ if (!done)
+ hdr->flag = BALLOON_FLAG_CONT;
+ else
+ hdr->flag = BALLOON_FLAG_DONE;
+
+ if (pos > 0 || done)
+ send_resp_data(vb, vq, true);
+
+}
+
+static void send_unused_pages(struct virtio_balloon *vb,
+ unsigned 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_...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...pages list.
> @@ -373,6 +378,49 @@ static void update_balloon_stats(struct virtio_balloon *vb)
> pages_to_bytes(available));
> }
>
> +static void update_free_pages_stats(struct virtio_balloon *vb,
why _stats?
> + unsigned long req_id)
> +{
> + struct scatterlist sg_in, sg_out;
> + unsigned long pfn = 0, bmap_len, max_pfn;
> + struct virtqueue *vq = vb->misc_vq;
> + struct balloon_bmap_hdr *hdr = vb->bmap_hdr;
> + int ret = 1;
> +
> + max_pfn = get_max_pfn();
> + mutex_lock(&vb->balloon_lock);
> + while (pfn < max_pfn) {
&g...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...pages list.
> @@ -373,6 +378,49 @@ static void update_balloon_stats(struct virtio_balloon *vb)
> pages_to_bytes(available));
> }
>
> +static void update_free_pages_stats(struct virtio_balloon *vb,
why _stats?
> + unsigned long req_id)
> +{
> + struct scatterlist sg_in, sg_out;
> + unsigned long pfn = 0, bmap_len, max_pfn;
> + struct virtqueue *vq = vb->misc_vq;
> + struct balloon_bmap_hdr *hdr = vb->bmap_hdr;
> + int ret = 1;
> +
> + max_pfn = get_max_pfn();
> + mutex_lock(&vb->balloon_lock);
> + while (pfn < max_pfn) {
&g...
2019 Apr 29
1
[RFC-PATCH] Introducing virtio-example.
...iver
+//-----------------------------------------------------------------------------
+
+static ssize_t
+virtio_buf_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ char tmp_buf[MAX_DATA_SIZE];
+ int retval;
+ struct scatterlist sg_in, sg_out;
+ struct scatterlist *request[2];
+ /* cast dev into a virtio_device */
+ struct virtio_device *vdev = dev_to_virtio(dev);
+ struct virtexample_info *vi = vdev->priv;
+
+ /* copy the user buffer since it is a const buffer */
+ sprintf(tmp_buf, "%s", buf);
+
+ /*...
2017 Mar 16
8
[PATCH kernel v8 0/4] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements two optimizations:
1) transfer pages in chuncks between the guest and host;
2) transfer the guest unused pages to the host so that they
can be skipped to migrate in live migration.
Please read each patch commit log for details.
Changes:
v7->v8:
1) Use only one chunk format, instead of two.
2) re-write the virtio-balloon implementation patch.
3) commit changes
4)
2017 Mar 16
8
[PATCH kernel v8 0/4] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements two optimizations:
1) transfer pages in chuncks between the guest and host;
2) transfer the guest unused pages to the host so that they
can be skipped to migrate in live migration.
Please read each patch commit log for details.
Changes:
v7->v8:
1) Use only one chunk format, instead of two.
2) re-write the virtio-balloon implementation patch.
3) commit changes
4)
2017 Apr 13
0
[PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ
...->vdev->dev, "%s: chunk %d of unknown pages\n",
__func__, type);
@@ -686,28 +708,139 @@ static void update_balloon_size_func(struct work_struct *work)
queue_work(system_freezable_wq, work);
}
+static void miscq_in_hdr_add(struct virtio_balloon *vb)
+{
+ struct scatterlist sg_in;
+
+ sg_init_one(&sg_in, vb->miscq_in_hdr,
+ sizeof(struct virtio_balloon_miscq_hdr));
+ if (virtqueue_add_inbuf(vb->miscq, &sg_in, 1, vb->miscq_in_hdr,
+ GFP_KERNEL) < 0) {
+ __virtio_clear_bit(vb->vdev,
+ VIRTIO_BALLOON_F_MISC_VQ);
+ dev_warn(&vb->vd...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 11/30/2016 12:43 AM, Liang Li wrote:
> +static void send_unused_pages_info(struct virtio_balloon *vb,
> + unsigned long req_id)
> +{
> + struct scatterlist sg_in;
> + unsigned long pos = 0;
> + struct virtqueue *vq = vb->req_vq;
> + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr;
> + int ret, order;
> +
> + mutex_lock(&vb->balloon_lock);
> +
> + for (order = MAX_ORDER - 1; order >= 0; order--) {
I scratched my he...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 11/30/2016 12:43 AM, Liang Li wrote:
> +static void send_unused_pages_info(struct virtio_balloon *vb,
> + unsigned long req_id)
> +{
> + struct scatterlist sg_in;
> + unsigned long pos = 0;
> + struct virtqueue *vq = vb->req_vq;
> + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr;
> + int ret, order;
> +
> + mutex_lock(&vb->balloon_lock);
> +
> + for (order = MAX_ORDER - 1; order >= 0; order--) {
I scratched my he...
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change 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
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change 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
2016 Nov 02
8
[PATCH kernel v4 0/7] 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 02
8
[PATCH kernel v4 0/7] 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%.