search for: handle_vq

Displaying 20 results from an estimated 51 matches for "handle_vq".

Did you mean: handle_tx
2020 Jun 02
1
[PATCH 1/6] vhost: allow device that does not depend on vhost worker
On Fri, May 29, 2020 at 04:02:58PM +0800, Jason Wang wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d450e16c5c25..70105e045768 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -166,11 +166,16 @@ static int vhost_poll_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, > void *key) > { > struct vhost_poll
2019 Oct 12
2
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
...> +static int newcode = 0; > +module_param(newcode, int, 0644); > + > /* Max number of bytes transferred before requeueing the job. > * Using this limit prevents one virtqueue from starving others. */ > #define VHOST_TEST_WEIGHT 0x80000 > @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) > vhost_disable_notify(&n->dev, vq); > > for (;;) { > - head = vhost_get_vq_desc(vq, vq->iov, > - ARRAY_SIZE(vq->iov), > - &out, &in, > - NULL, NULL); > + if (newcode) > + head = vhost_get_vq_desc_batc...
2019 Oct 12
2
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
...> +static int newcode = 0; > +module_param(newcode, int, 0644); > + > /* Max number of bytes transferred before requeueing the job. > * Using this limit prevents one virtqueue from starving others. */ > #define VHOST_TEST_WEIGHT 0x80000 > @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) > vhost_disable_notify(&n->dev, vq); > > for (;;) { > - head = vhost_get_vq_desc(vq, vq->iov, > - ARRAY_SIZE(vq->iov), > - &out, &in, > - NULL, NULL); > + if (newcode) > + head = vhost_get_vq_desc_batc...
2019 Oct 14
2
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
..._param(newcode, int, 0644); >>> + >>> /* Max number of bytes transferred before requeueing the job. >>> * Using this limit prevents one virtqueue from starving others. */ >>> #define VHOST_TEST_WEIGHT 0x80000 >>> @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) >>> vhost_disable_notify(&n->dev, vq); >>> for (;;) { >>> - head = vhost_get_vq_desc(vq, vq->iov, >>> - ARRAY_SIZE(vq->iov), >>> - &out, &in, >>> - NULL, NULL); >>> + i...
2019 Oct 14
2
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
..._param(newcode, int, 0644); >>> + >>> /* Max number of bytes transferred before requeueing the job. >>> * Using this limit prevents one virtqueue from starving others. */ >>> #define VHOST_TEST_WEIGHT 0x80000 >>> @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) >>> vhost_disable_notify(&n->dev, vq); >>> for (;;) { >>> - head = vhost_get_vq_desc(vq, vq->iov, >>> - ARRAY_SIZE(vq->iov), >>> - &out, &in, >>> - NULL, NULL); >>> + i...
2013 May 08
1
[PATCH v2] vhost-test: Make vhost/test.c work
...rtqueue vq; +}; + struct vhost_test { struct vhost_dev dev; - struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; + struct vhost_test_virtqueue vqs[VHOST_TEST_VQ_MAX]; }; /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void handle_vq(struct vhost_test *n) { - struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; + struct vhost_virtqueue *vq = n->dev.vqs[VHOST_TEST_VQ]; unsigned out, in; int head; size_t len, total_len = 0; @@ -101,15 +105,23 @@ static void handle_vq_kick(struct vhost_work *work) static int...
2013 May 08
1
[PATCH v2] vhost-test: Make vhost/test.c work
...rtqueue vq; +}; + struct vhost_test { struct vhost_dev dev; - struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; + struct vhost_test_virtqueue vqs[VHOST_TEST_VQ_MAX]; }; /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void handle_vq(struct vhost_test *n) { - struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; + struct vhost_virtqueue *vq = n->dev.vqs[VHOST_TEST_VQ]; unsigned out, in; int head; size_t len, total_len = 0; @@ -101,15 +105,23 @@ static void handle_vq_kick(struct vhost_work *work) static int...
2014 Jul 01
0
[PATCH RFC 2/2] vhost: support urgent descriptors
...v_base; ret = __copy_to_user(resp, &rsp, sizeof(rsp)); if (!ret) - vhost_add_used_and_signal(&vs->dev, vq, head, 0); + vhost_add_used_and_signal(&vs->dev, vq, urgent, head, 0); else pr_err("Faulted on virtio_scsi_cmd_resp\n"); } @@ -980,6 +985,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) u8 *target, *lunp, task_attr; bool hdr_pi; void *req, *cdb; + bool urgent; mutex_lock(&vq->mutex); /* @@ -993,7 +999,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) vhost_disable_notify(&vs->...
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2013 May 07
1
[PATCH] vhost-test: Make vhost/test.c work
...rtqueue vq; +}; + struct vhost_test { struct vhost_dev dev; - struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; + struct vhost_test_virtqueue vqs[VHOST_TEST_VQ_MAX]; }; /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void handle_vq(struct vhost_test *n) { - struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; + struct vhost_virtqueue *vq = n->dev.vqs[VHOST_TEST_VQ]; unsigned out, in; int head; size_t len, total_len = 0; @@ -101,15 +105,23 @@ static void handle_vq_kick(struct vhost_work *work) static int...
2013 May 07
1
[PATCH] vhost-test: Make vhost/test.c work
...rtqueue vq; +}; + struct vhost_test { struct vhost_dev dev; - struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; + struct vhost_test_virtqueue vqs[VHOST_TEST_VQ_MAX]; }; /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void handle_vq(struct vhost_test *n) { - struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; + struct vhost_virtqueue *vq = n->dev.vqs[VHOST_TEST_VQ]; unsigned out, in; int head; size_t len, total_len = 0; @@ -101,15 +105,23 @@ static void handle_vq_kick(struct vhost_work *work) static int...
2013 May 07
5
[PATCH 0/4] vhost private_data rcu removal
Asias He (4): vhost-net: Always access vq->private_data under vq mutex vhost-test: Always access vq->private_data under vq mutex vhost-scsi: Always access vq->private_data under vq mutex vhost: Remove custom vhost rcu usage drivers/vhost/net.c | 37 ++++++++++++++++--------------------- drivers/vhost/scsi.c | 17 ++++++----------- drivers/vhost/test.c | 20
2013 May 07
5
[PATCH 0/4] vhost private_data rcu removal
Asias He (4): vhost-net: Always access vq->private_data under vq mutex vhost-test: Always access vq->private_data under vq mutex vhost-scsi: Always access vq->private_data under vq mutex vhost: Remove custom vhost rcu usage drivers/vhost/net.c | 37 ++++++++++++++++--------------------- drivers/vhost/scsi.c | 17 ++++++----------- drivers/vhost/test.c | 20
2014 May 13
2
[PATCH v1] vhost: avoid large order allocations
A test case which generates memory pressure while performing guest administration fails with vhost triggering "page allocation failure" and guest not starting up. After some analysis we discovered the allocation order of vhost to be rensponsible for this behaviour. Thus we suggest patch 1/1 which dynamically allocates the required memory. Please see its description for details. Thanks,
2014 May 13
2
[PATCH v1] vhost: avoid large order allocations
A test case which generates memory pressure while performing guest administration fails with vhost triggering "page allocation failure" and guest not starting up. After some analysis we discovered the allocation order of vhost to be rensponsible for this behaviour. Thus we suggest patch 1/1 which dynamically allocates the required memory. Please see its description for details. Thanks,
2019 Oct 12
0
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
...> > +module_param(newcode, int, 0644); > > + > > /* Max number of bytes transferred before requeueing the job. > > * Using this limit prevents one virtqueue from starving others. */ > > #define VHOST_TEST_WEIGHT 0x80000 > > @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) > > vhost_disable_notify(&n->dev, vq); > > for (;;) { > > - head = vhost_get_vq_desc(vq, vq->iov, > > - ARRAY_SIZE(vq->iov), > > - &out, &in, > > - NULL, NULL); > > + if (newcode) > > +...
2019 Oct 15
0
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
...t; > > + > > > > /* Max number of bytes transferred before requeueing the job. > > > > * Using this limit prevents one virtqueue from starving others. */ > > > > #define VHOST_TEST_WEIGHT 0x80000 > > > > @@ -58,10 +61,16 @@ static void handle_vq(struct vhost_test *n) > > > > vhost_disable_notify(&n->dev, vq); > > > > for (;;) { > > > > - head = vhost_get_vq_desc(vq, vq->iov, > > > > - ARRAY_SIZE(vq->iov), > > > > - &out, &in, > > >...
2014 May 13
0
[PATCH v1] vhost: avoid large order allocations
...p;vs->dev, vq); > head = vhost_get_vq_desc(&vs->dev, vq, vq->iov, > - ARRAY_SIZE(vq->iov), &out, &in, > + UIO_MAXIOV, &out, &in, > NULL, NULL); > if (head < 0) { > vs->vs_events_missed = true; > @@ -946,7 +946,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) > > for (;;) { > head = vhost_get_vq_desc(&vs->dev, vq, vq->iov, > - ARRAY_SIZE(vq->iov), &out, &in, > + UIO_MAXIOV, &out, &in, > NULL, NULL); > pr_debug("vhost_get_vq_d...
2014 Jul 01
5
[PATCH RFC 1/2] virtio: support for urgent descriptors
Below should be useful for some experiments Jason is doing. I thought I'd send it out for early review/feedback. Compiled-only at this point. event idx feature allows us to defer interrupts until a specific # of descriptors were used. Sometimes it might be useful to get an interrupt after a specific descriptor, regardless. This adds a descriptor flag for this, and an API to create an urgent