Displaying 12 results from an estimated 12 matches for "virtio_fs_request_dispatch_work".
2023 May 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...rk_struct *work)
dec_in_flight_req(fsvq);
}
} while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
+
+ if (!list_empty(&fsvq->queued_reqs))
+ schedule_work(&fsvq->dispatch_work);
spin_unlock(&fsvq->lock);
}
@@ -353,7 +356,7 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
{
struct fuse_req *req;
struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
- dispatch_work.work);
+ dispatch_work);
int ret;
pr_debug("virtio-fs: worker %s called.\n", __func__);
@@ -388,8 +391,6 @@ static void virtio_fs_re...
2023 Jul 03
2
[PATCH V4] virtio-fs: Improved request latencies when Virtio queue is full
...rk_struct *work)
dec_in_flight_req(fsvq);
}
} while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
+
+ if (!list_empty(&fsvq->queued_reqs))
+ schedule_work(&fsvq->dispatch_work);
spin_unlock(&fsvq->lock);
}
@@ -353,7 +356,7 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
{
struct fuse_req *req;
struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
- dispatch_work.work);
+ dispatch_work);
int ret;
pr_debug("virtio-fs: worker %s called.\n", __func__);
@@ -388,8 +391,6 @@ static void virtio_fs_re...
2023 Jun 01
2
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...> > >> +
> > >> + if (!list_empty(&fsvq->queued_reqs))
> > >> + schedule_work(&fsvq->dispatch_work);
> > >> spin_unlock(&fsvq->lock);
> > >> }
> > >>
> > >> @@ -353,7 +356,7 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
> > >> {
> > >> struct fuse_req *req;
> > >> struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
> > >> - dispatch_work.work);
> > >> + dispatch_work);
> > >> int ret...
2023 May 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...likely(!virtqueue_is_broken(vq)));
> >> +
> >> + if (!list_empty(&fsvq->queued_reqs))
> >> + schedule_work(&fsvq->dispatch_work);
> >> spin_unlock(&fsvq->lock);
> >> }
> >>
> >> @@ -353,7 +356,7 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
> >> {
> >> struct fuse_req *req;
> >> struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
> >> - dispatch_work.work);
> >> + dispatch_work);
> >> int ret;
> >>
> >>...
2023 Jun 01
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...t;> +
>>>>> + if (!list_empty(&fsvq->queued_reqs))
>>>>> + schedule_work(&fsvq->dispatch_work);
>>>>> spin_unlock(&fsvq->lock);
>>>>> }
>>>>>
>>>>> @@ -353,7 +356,7 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
>>>>> {
>>>>> struct fuse_req *req;
>>>>> struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
>>>>> - dispatch_work.work);
>>>>> + dispatch_work);
>>>>&g...
2019 Oct 15
7
[PATCH 0/5] virtiofs: Fix couple of deadlocks
Hi,
We have couple of places which can result in deadlock. This patch series
fixes these.
We can be called with fc->bg_lock (for background requests) while
submitting a request. This leads to two constraints.
- We can't end requests in submitter's context and call fuse_end_request()
as it tries to take fc->bg_lock as well. So queue these requests on a
list and use a worker to
2023 May 22
1
[PATCH] virtio-fs: Improved request latencies when Virtio queue is full
...use/virtio_fs.c
@@ -347,6 +347,8 @@ static void virtio_fs_hiprio_done_work(struct work_struct *work)
}
} while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
spin_unlock(&fsvq->lock);
+
+ schedule_delayed_work(&fsvq->dispatch_work, 0);
}
static void virtio_fs_request_dispatch_work(struct work_struct *work)
@@ -388,8 +390,6 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
if (ret == -ENOMEM || ret == -ENOSPC) {
spin_lock(&fsvq->lock);
list_add_tail(&req->list, &fsvq->queued_reqs);
- schedule_delayed_work(&fsvq-...
2019 Oct 30
6
[PATCH 0/3] virtiofs: Small Cleanups for 5.5
Hi Miklos,
Here are few small cleanups for virtiofs for 5.5. I had received some
comments from Michael Tsirkin on original virtiofs patches and these
cleanups are result of these comments.
Thanks
Vivek
Vivek Goyal (3):
virtiofs: Use a common function to send forget
virtiofs: Do not send forget request "struct list_head" element
virtiofs: Use completions while waiting for queue
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...gt; > INIT_WORK(&fs->vqs[i].done_work, virtio_fs_requests_done_work);
> > INIT_DELAYED_WORK(&fs->vqs[i].dispatch_work,
> > - virtio_fs_dummy_dispatch_work);
> > + virtio_fs_request_dispatch_work);
> > INIT_LIST_HEAD(&fs->vqs[i].queued_reqs);
> > + INIT_LIST_HEAD(&fs->vqs[i].end_reqs);
> > snprintf(fs->vqs[i].name, sizeof(fs->vqs[i].name),
> > "requests.%u", i - VQ_RE...
2019 Oct 21
0
[PATCH 5/5] virtiofs: Retry request submission from worker context
On Mon, Oct 21, 2019 at 10:15:18AM +0200, Miklos Szeredi wrote:
[..]
> > @@ -268,13 +272,43 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
> > list);
> > if (!req) {
> > spin_unlock(&fsvq->lock);
> > - return;
> > + break;
> >...
2019 Oct 30
0
[PATCH 3/3] virtiofs: Use completions while waiting for queue to be drained
...IO].dispatch_work,
virtio_fs_hiprio_dispatch_work);
+ init_completion(&fs->vqs[VQ_HIPRIO].in_flight_zero);
spin_lock_init(&fs->vqs[VQ_HIPRIO].lock);
/* Initialize the requests virtqueues */
@@ -591,6 +609,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
virtio_fs_request_dispatch_work);
INIT_LIST_HEAD(&fs->vqs[i].queued_reqs);
INIT_LIST_HEAD(&fs->vqs[i].end_reqs);
+ init_completion(&fs->vqs[i].in_flight_zero);
snprintf(fs->vqs[i].name, sizeof(fs->vqs[i].name),
"requests.%u", i - VQ_REQUEST);
callbacks[i] = virtio_fs_vq_done;...
2019 Oct 30
0
[PATCH 1/3] virtiofs: Use a common function to send forget
...use/virtio_fs.c | 150 +++++++++++++++++++-------------------------
1 file changed, 63 insertions(+), 87 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index a5c86048b96e..6cc7be170cb8 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -313,17 +313,71 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work)
}
}
+/*
+ * Returns 1 if queue is full and sender should wait a bit before sending
+ * next request, 0 otherwise.
+ */
+static int send_forget_request(struct virtio_fs_vq *fsvq,
+ struct virtio_fs_forget *forget,
+ bool in_flight)
+{
+ struct scatter...