Displaying 13 results from an estimated 13 matches for "free_page_cmd_out".
2017 Sep 05
0
[PATCH v15 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...callback in oom notifier call chain */
> struct notifier_block nb;
> +
> + /* Host to guest ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_in;
> + /* Guest to Host ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_out;
> };
>
> static struct virtio_device_id id_table[] = { @@ -177,6 +191,26 @@ static void
> send_balloon_page_sg(struct virtio_balloon *vb,
> }
> }
>
> +static void send_free_page_sg(struct virtqueue *vq, void *addr,
> +uint32_t size) {
> + unsigned int len;
>...
2017 Sep 05
0
[PATCH v15 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...callback in oom notifier call chain */
> struct notifier_block nb;
> +
> + /* Host to guest ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_in;
> + /* Guest to Host ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_out;
> };
>
> static struct virtio_device_id id_table[] = { @@ -177,6 +191,26 @@ static void
> send_balloon_page_sg(struct virtio_balloon *vb,
> }
> }
>
> +static void send_free_page_sg(struct virtqueue *vq, void *addr,
> +uint32_t size) {
> + unsigned int len;
>...
2017 Sep 30
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...o_balloon {
/* To register callback in oom notifier call chain */
struct notifier_block nb;
+
+ /* Host to guest ctrlq cmd buf for free page report */
+ struct virtio_balloon_ctrlq_cmd free_page_cmd_in;
+ /* Guest to Host ctrlq cmd buf for free page report */
+ struct virtio_balloon_ctrlq_cmd free_page_cmd_out;
};
static struct virtio_device_id id_table[] = {
@@ -186,6 +200,24 @@ static int send_balloon_page_sg(struct virtio_balloon *vb,
return err;
}
+static int send_free_page_sg(struct virtqueue *vq, void *addr, uint32_t size)
+{
+ int ret = 0;
+
+ /*
+ * Since this is an optimization feature...
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...callback in oom notifier call chain */
> struct notifier_block nb;
> +
> + /* Host to guest ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_in;
> + /* Guest to Host ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_out;
> };
>
> static struct virtio_device_id id_table[] = {
> @@ -186,6 +200,24 @@ static int send_balloon_page_sg(struct virtio_balloon *vb,
> return err;
> }
>
> +static int send_free_page_sg(struct virtqueue *vq, void *addr, uint32_t size)
> +{
> + int ret = 0;...
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...callback in oom notifier call chain */
> struct notifier_block nb;
> +
> + /* Host to guest ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_in;
> + /* Guest to Host ctrlq cmd buf for free page report */
> + struct virtio_balloon_ctrlq_cmd free_page_cmd_out;
> };
>
> static struct virtio_device_id id_table[] = {
> @@ -186,6 +200,24 @@ static int send_balloon_page_sg(struct virtio_balloon *vb,
> return err;
> }
>
> +static int send_free_page_sg(struct virtqueue *vq, void *addr, uint32_t size)
> +{
> + int ret = 0;...
2017 Oct 12
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...used by the
guest to report stats, and also used by the host to ask the guest for
stats report.
So the host can roll back one previous entry and what it gets will
always be stat_vq_elem.
Our case is a little more complex than that - we have both free_page_cmd_in
(for host to guest command) and free_page_cmd_out (for guest to host
command) buffer
passed via ctrl_vq. When the host rolls back one entry, it may get the
free_page_cmd_out
buffer which can't be used as the host to guest buffer (i.e.
free_page_elem held by the device).
So a trick in the driver is to refill the free_page_cmd_in buffer ever...
2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Wed, Oct 11, 2017 at 02:03:20PM +0800, Wei Wang wrote:
> On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote:
> > On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote:
> > > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote:
> > > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote:
> > > > > +static void ctrlq_send_cmd(struct
2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Wed, Oct 11, 2017 at 02:03:20PM +0800, Wei Wang wrote:
> On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote:
> > On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote:
> > > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote:
> > > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote:
> > > > > +static void ctrlq_send_cmd(struct
2017 Sep 30
12
[PATCH v16 0/5] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following
new features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks using sgs, instead of one array each time; and
2) free page block reporting: a new virtqueue to report guest free pages
to the host.
The second feature can be used to accelerate live migration of VMs. Here
are some details:
Live
2017 Sep 30
12
[PATCH v16 0/5] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following
new features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks using sgs, instead of one array each time; and
2) free page block reporting: a new virtqueue to report guest free pages
to the host.
The second feature can be used to accelerate live migration of VMs. Here
are some details:
Live
2017 Oct 02
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...int class, cmd, len;
> > +
> > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len);
> > + if (unlikely(!msg))
> > + return;
> > +
> > + /* The outbuf is sent by the host for recycling, so just return. */
> > + if (msg == &vb->free_page_cmd_out)
> > + return;
> > +
> > + class = virtio32_to_cpu(vb->vdev, msg->class);
> > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd);
> > +
> > + switch (class) {
> > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:
> > + if (cmd == VIRTIO_BALLOON_FRE...
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...; +
> > > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len);
> > > + if (unlikely(!msg))
> > > + return;
> > > +
> > > + /* The outbuf is sent by the host for recycling, so just return. */
> > > + if (msg == &vb->free_page_cmd_out)
> > > + return;
> > > +
> > > + class = virtio32_to_cpu(vb->vdev, msg->class);
> > > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd);
> > > +
> > > + switch (class) {
> > > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:
> &g...
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...; +
> > > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len);
> > > + if (unlikely(!msg))
> > > + return;
> > > +
> > > + /* The outbuf is sent by the host for recycling, so just return. */
> > > + if (msg == &vb->free_page_cmd_out)
> > > + return;
> > > +
> > > + class = virtio32_to_cpu(vb->vdev, msg->class);
> > > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd);
> > > +
> > > + switch (class) {
> > > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:
> &g...