Displaying 14 results from an estimated 14 matches for "virtio_balloon_f_cmd_vq".
2017 Jun 09
0
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...virtio_balloon *vb,
+ struct virtio_balloon_cmdq_hdr *hdr)
+{
+ struct scatterlist sg;
+
+ hdr->flags = 0;
+ sg_init_one(&sg, hdr, VIRTIO_BALLOON_CMDQ_HDR_SIZE);
+
+ if (virtqueue_add_inbuf(vb->cmd_vq, &sg, 1, hdr, GFP_KERNEL) < 0) {
+ __virtio_clear_bit(vb->vdev,
+ VIRTIO_BALLOON_F_CMD_VQ);
+ dev_warn(&vb->vdev->dev, "%s: add miscq msg buf err\n",
+ __func__);
+ return;
+ }
+
+ virtqueue_kick(vb->cmd_vq);
+}
+
+static void cmdq_handle_unused_pages(struct virtio_balloon *vb)
+{
+ struct virtqueue *vq = vb->cmd_vq;
+ struct vring_desc *hdr_desc = &vb...
2017 Jul 12
0
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
..."inflate", "deflate", "stats" };
- int err, nvqs;
+ struct virtqueue **vqs;
+ vq_callback_t **callbacks;
+ const char **names;
+ int err = -ENOMEM;
+ int nvqs;
+
+ /* Inflateq and deflateq are used unconditionally */
+ nvqs = 2;
+
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CMD_VQ) ||
+ virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
+ nvqs++;
+
+ /* Allocate space for find_vqs parameters */
+ vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
+ if (!vqs)
+ goto err_vq;
+ callbacks = kmalloc_array(nvqs, sizeof(*callbacks), GFP_KERNEL);
+ if (!callbacks)
+ goto...
2017 Jun 12
1
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On 06/09/2017 03:41 AM, Wei Wang wrote:
> + for_each_populated_zone(zone) {
> + for (order = MAX_ORDER - 1; order > 0; order--) {
> + for (migratetype = 0; migratetype < MIGRATE_TYPES;
> + migratetype++) {
> + do {
> + ret = report_unused_page_block(zone,
> + order, migratetype, &page);
> + if (!ret) {
> + pfn =
2017 Jun 12
1
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On 06/09/2017 03:41 AM, Wei Wang wrote:
> + for_each_populated_zone(zone) {
> + for (order = MAX_ORDER - 1; order > 0; order--) {
> + for (migratetype = 0; migratetype < MIGRATE_TYPES;
> + migratetype++) {
> + do {
> + ret = report_unused_page_block(zone,
> + order, migratetype, &page);
> + if (!ret) {
> + pfn =
2017 Jul 13
0
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On 07/13/2017 08:22 AM, Michael S. Tsirkin wrote:
> On Wed, Jul 12, 2017 at 08:40:21PM +0800, Wei Wang wrote:
>> Add a new vq, cmdq, to handle requests between the device and driver.
>>
>> This patch implements two commands sent from the device and handled in
>> the driver.
>> 1) VIRTIO_BALLOON_CMDQ_REPORT_STATS: this command is used to report
>> the guest
2017 Jul 12
0
[virtio-dev] Re: [PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On 06/28/2017 11:01 PM, Michael S. Tsirkin wrote:
> On Thu, Jun 22, 2017 at 04:40:39PM +0800, Wei Wang wrote:
>> On 06/21/2017 08:28 PM, Michael S. Tsirkin wrote:
>>> On Wed, Jun 21, 2017 at 11:28:00AM +0800, Wei Wang wrote:
>>>> On 06/21/2017 12:18 AM, Michael S. Tsirkin wrote:
>>>>> On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
2017 Jul 13
2
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...quot; };
> - int err, nvqs;
> + struct virtqueue **vqs;
> + vq_callback_t **callbacks;
> + const char **names;
> + int err = -ENOMEM;
> + int nvqs;
> +
> + /* Inflateq and deflateq are used unconditionally */
> + nvqs = 2;
> +
> + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CMD_VQ) ||
> + virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
> + nvqs++;
> +
> + /* Allocate space for find_vqs parameters */
> + vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
> + if (!vqs)
> + goto err_vq;
> + callbacks = kmalloc_array(nvqs, sizeof(*callbacks)...
2017 Jul 13
2
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...quot; };
> - int err, nvqs;
> + struct virtqueue **vqs;
> + vq_callback_t **callbacks;
> + const char **names;
> + int err = -ENOMEM;
> + int nvqs;
> +
> + /* Inflateq and deflateq are used unconditionally */
> + nvqs = 2;
> +
> + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CMD_VQ) ||
> + virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))
> + nvqs++;
> +
> + /* Allocate space for find_vqs parameters */
> + vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
> + if (!vqs)
> + goto err_vq;
> + callbacks = kmalloc_array(nvqs, sizeof(*callbacks)...
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq,
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq,
2017 Jul 12
19
[PATCH v12 0/8] Virtio-balloon Enhancement
...st
Matthew Wilcox (1):
Introduce xbitmap
Wei Wang (6):
virtio-balloon: coding format cleanup
xbitmap: add xb_find_next_bit() and xb_zero()
virtio-balloon: VIRTIO_BALLOON_F_SG
mm: support reporting free page blocks
mm: export symbol of next_zone and first_online_pgdat
virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
drivers/virtio/virtio_balloon.c | 414 ++++++++++++++++++++++++++++++++----
drivers/virtio/virtio_ring.c | 224 +++++++++++++++++--
include/linux/mm.h | 5 +
include/linux/radix-tree.h | 2 +
include/linux/virtio.h | 22 ++
include/linux/xbit...
2017 Jul 12
19
[PATCH v12 0/8] Virtio-balloon Enhancement
...st
Matthew Wilcox (1):
Introduce xbitmap
Wei Wang (6):
virtio-balloon: coding format cleanup
xbitmap: add xb_find_next_bit() and xb_zero()
virtio-balloon: VIRTIO_BALLOON_F_SG
mm: support reporting free page blocks
mm: export symbol of next_zone and first_online_pgdat
virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
drivers/virtio/virtio_balloon.c | 414 ++++++++++++++++++++++++++++++++----
drivers/virtio/virtio_ring.c | 224 +++++++++++++++++--
include/linux/mm.h | 5 +
include/linux/radix-tree.h | 2 +
include/linux/virtio.h | 22 ++
include/linux/xbit...
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
...nused pages.
Liang Li (1):
virtio-balloon: deflate via a page list
Wei Wang (5):
virtio-balloon: coding format cleanup
virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
mm: function to offer a page block on the free list
mm: export symbol of next_zone and first_online_pgdat
virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
drivers/virtio/virtio_balloon.c | 781 ++++++++++++++++++++++++++++++++----
drivers/virtio/virtio_ring.c | 120 +++++-
include/linux/mm.h | 5 +
include/linux/virtio.h | 7 +
include/uapi/linux/virtio_balloon.h | 14 +
include/uapi/linux/virtio_ring.h...
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
...nused pages.
Liang Li (1):
virtio-balloon: deflate via a page list
Wei Wang (5):
virtio-balloon: coding format cleanup
virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
mm: function to offer a page block on the free list
mm: export symbol of next_zone and first_online_pgdat
virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
drivers/virtio/virtio_balloon.c | 781 ++++++++++++++++++++++++++++++++----
drivers/virtio/virtio_ring.c | 120 +++++-
include/linux/mm.h | 5 +
include/linux/virtio.h | 7 +
include/uapi/linux/virtio_balloon.h | 14 +
include/uapi/linux/virtio_ring.h...