Displaying 12 results from an estimated 12 matches for "virtio_fs_hiprio_done_work".
2023 May 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq)
}
flush_work(&fsvq->done_work);
- flush_delayed_work(&fsvq->dispatch_work);
+ flush_work(&fsvq->dispatch_work);
}
static void virtio_fs_drain_all_queues_locked(struct virtio_fs *fs)
@@ -346,6 +346,9 @@ static void virtio_fs_hiprio_done_work(struct work_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 @@ st...
2023 Jul 03
2
[PATCH V4] virtio-fs: Improved request latencies when Virtio queue is full
...void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq)
}
flush_work(&fsvq->done_work);
- flush_delayed_work(&fsvq->dispatch_work);
+ flush_work(&fsvq->dispatch_work);
}
static void virtio_fs_drain_all_queues_locked(struct virtio_fs *fs)
@@ -346,6 +346,9 @@ static void virtio_fs_hiprio_done_work(struct work_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 @@ st...
2023 May 22
1
[PATCH] virtio-fs: Improved request latencies when Virtio queue is full
...;peter-jan at gootzen.net>
---
fs/fuse/virtio_fs.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 4d8d4f16c727..8af9d3dc61d3 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/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...
2023 Jun 01
2
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...> - flush_delayed_work(&fsvq->dispatch_work);
> > >> + flush_work(&fsvq->dispatch_work);
> > >> }
> > >>
> > >> static void virtio_fs_drain_all_queues_locked(struct virtio_fs *fs)
> > >> @@ -346,6 +346,9 @@ static void virtio_fs_hiprio_done_work(struct work_struct *work)
> > >> dec_in_flight_req(fsvq);
> > >> }
> > >> } while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
> > >> +
> > >> + if (!list_empty(&fsvq->queued_reqs))
> > >...
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 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...>done_work);
> >> - flush_delayed_work(&fsvq->dispatch_work);
> >> + flush_work(&fsvq->dispatch_work);
> >> }
> >>
> >> static void virtio_fs_drain_all_queues_locked(struct virtio_fs *fs)
> >> @@ -346,6 +346,9 @@ static void virtio_fs_hiprio_done_work(struct work_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(&fsv...
2023 Jun 01
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...sh_delayed_work(&fsvq->dispatch_work);
>>>>> + flush_work(&fsvq->dispatch_work);
>>>>> }
>>>>>
>>>>> static void virtio_fs_drain_all_queues_locked(struct virtio_fs *fs)
>>>>> @@ -346,6 +346,9 @@ static void virtio_fs_hiprio_done_work(struct work_struct *work)
>>>>> dec_in_flight_req(fsvq);
>>>>> }
>>>>> } while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
>>>>> +
>>>>> + if (!list_empty(&fsvq->queued_reqs))
>...
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...> > static void virtio_fs_hiprio_dispatch_work(struct work_struct *work)
> > @@ -502,6 +522,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> > names[VQ_HIPRIO] = fs->vqs[VQ_HIPRIO].name;
> > INIT_WORK(&fs->vqs[VQ_HIPRIO].done_work, virtio_fs_hiprio_done_work);
> > INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].queued_reqs);
> > + INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].end_reqs);
> > INIT_DELAYED_WORK(&fs->vqs[VQ_HIPRIO].dispatch_work,
> > virtio_fs_hiprio_dispatch_work);
> &g...
2019 Oct 15
0
[PATCH 4/5] virtiofs: Count pending forgets as in_flight forgets
..._fs_vq *fsvq;
@@ -133,9 +130,6 @@ static void virtio_fs_drain_all_queues(struct virtio_fs *fs)
for (i = 0; i < fs->nvqs; i++) {
fsvq = &fs->vqs[i];
- if (i == VQ_HIPRIO)
- drain_hiprio_queued_reqs(fsvq);
-
virtio_fs_drain_queue(fsvq);
}
}
@@ -254,7 +248,7 @@ static void virtio_fs_hiprio_done_work(struct work_struct *work)
while ((req = virtqueue_get_buf(vq, &len)) != NULL) {
kfree(req);
- fsvq->in_flight--;
+ dec_in_flight_req(fsvq);
}
} while (!virtqueue_enable_cb(vq) && likely(!virtqueue_is_broken(vq)));
spin_unlock(&fsvq->lock);
@@ -306,6 +300,7...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
...> + fs->tag = devm_kmalloc(&vdev->dev, len + 1, GFP_KERNEL);
> + if (!fs->tag)
> + return -ENOMEM;
> + memcpy(fs->tag, tag_buf, len);
> + fs->tag[len] = '\0';
> + return 0;
> +}
> +
> +/* Work function for hiprio completion */
> +static void virtio_fs_hiprio_done_work(struct work_struct *work)
> +{
> + struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
> + done_work);
> + struct virtqueue *vq = fsvq->vq;
> +
> + /* Free completed FUSE_FORGET requests */
> + spin_lock(&fsvq->lock);
> + do {
> + unsigned...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...> + fs->tag = devm_kmalloc(&vdev->dev, len + 1, GFP_KERNEL);
> + if (!fs->tag)
> + return -ENOMEM;
> + memcpy(fs->tag, tag_buf, len);
> + fs->tag[len] = '\0';
> + return 0;
> +}
> +
> +/* Work function for hiprio completion */
> +static void virtio_fs_hiprio_done_work(struct work_struct *work)
> +{
> + struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
> + done_work);
> + struct virtqueue *vq = fsvq->vq;
> +
> + /* Free completed FUSE_FORGET requests */
> + spin_lock(&fsvq->lock);
> + do {
> + unsigned...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...> + fs->tag = devm_kmalloc(&vdev->dev, len + 1, GFP_KERNEL);
> + if (!fs->tag)
> + return -ENOMEM;
> + memcpy(fs->tag, tag_buf, len);
> + fs->tag[len] = '\0';
> + return 0;
> +}
> +
> +/* Work function for hiprio completion */
> +static void virtio_fs_hiprio_done_work(struct work_struct *work)
> +{
> + struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
> + done_work);
> + struct virtqueue *vq = fsvq->vq;
> +
> + /* Free completed FUSE_FORGET requests */
> + spin_lock(&fsvq->lock);
> + do {
> + unsigned...