Displaying 20 results from an estimated 77 matches for "__releases".
Did you mean:
20releases
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
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...INIT_LIST_HEAD(&fs->vqs[i].end_reqs);
> > snprintf(fs->vqs[i].name, sizeof(fs->vqs[i].name),
> > "requests.%u", i - VQ_REQUEST);
> > callbacks[i] = virtio_fs_vq_done;
> > @@ -918,6 +940,7 @@ __releases(fiq->lock)
> > struct fuse_conn *fc;
> > struct fuse_req *req;
> > struct fuse_pqueue *fpq;
> > + struct virtio_fs_vq *fsvq;
> > int ret;
> >
> > WARN_ON(list_empty(&fiq->pending));
> > @@ -951,7...
2019 Sep 06
1
[PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference
...yal wrote:
> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
> index 85e2dcad68c1..04e2c000d63f 100644
> --- a/fs/fuse/fuse_i.h
> +++ b/fs/fuse/fuse_i.h
> @@ -479,6 +479,11 @@ struct fuse_iqueue_ops {
> */
> void (*wake_pending_and_unlock)(struct fuse_iqueue *fiq)
> __releases(fiq->waitq.lock);
> +
> + /**
> + * Put a reference on fiq_priv.
I'm a bit confused about fiq->priv's role in this. The callback takes
struct fuse_iqueue *fiq as the argument, not void *priv, so it could
theoretically do more than just release priv.
I think one of the fol...
2023 May 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...est_dispatch_work);
} else {
INIT_WORK(&fsvq->done_work, virtio_fs_hiprio_done_work);
- INIT_DELAYED_WORK(&fsvq->dispatch_work,
- virtio_fs_hiprio_dispatch_work);
+ INIT_WORK(&fsvq->dispatch_work,
+ virtio_fs_hiprio_dispatch_work);
}
}
@@ -1254,8 +1258,6 @@ __releases(fiq->lock)
spin_lock(&fsvq->lock);
list_add_tail(&req->list, &fsvq->queued_reqs);
inc_in_flight_req(fsvq);
- schedule_delayed_work(&fsvq->dispatch_work,
- msecs_to_jiffies(1));
spin_unlock(&fsvq->lock);
return;
}
@@ -1265,7 +1267,7...
2023 Jul 03
2
[PATCH V4] virtio-fs: Improved request latencies when Virtio queue is full
...est_dispatch_work);
} else {
INIT_WORK(&fsvq->done_work, virtio_fs_hiprio_done_work);
- INIT_DELAYED_WORK(&fsvq->dispatch_work,
- virtio_fs_hiprio_dispatch_work);
+ INIT_WORK(&fsvq->dispatch_work,
+ virtio_fs_hiprio_dispatch_work);
}
}
@@ -1254,8 +1258,6 @@ __releases(fiq->lock)
spin_lock(&fsvq->lock);
list_add_tail(&req->list, &fsvq->queued_reqs);
inc_in_flight_req(fsvq);
- schedule_delayed_work(&fsvq->dispatch_work,
- msecs_to_jiffies(1));
spin_unlock(&fsvq->lock);
return;
}
@@ -1265,7 +1267,7...
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 23
1
[PATCH -next] virtiofs: remove unused variable 'fc'
...cted state")
Signed-off-by: YueHaibing <yuehaibing at huawei.com>
---
fs/fuse/virtio_fs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 2de8fc0..a5c8604 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -980,7 +980,6 @@ __releases(fiq->lock)
{
unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */
struct virtio_fs *fs;
- struct fuse_conn *fc;
struct fuse_req *req;
struct virtio_fs_vq *fsvq;
int ret;
@@ -993,7 +992,6 @@ __releases(fiq->lock)
spin_unlock(&fiq->lock);
fs = fiq->priv;
- fc = f...
2019 Oct 30
0
[PATCH 2/3] virtiofs: Do not send forget request "struct list_head" element
...) {
@@ -334,7 +339,7 @@ static int send_forget_request(struct virtio_fs_vq *fsvq,
goto out;
}
- sg_init_one(&sg, forget, sizeof(*forget));
+ sg_init_one(&sg, req, sizeof(*req));
vq = fsvq->vq;
dev_dbg(&vq->vdev->dev, "%s\n", __func__);
@@ -730,6 +735,7 @@ __releases(fiq->lock)
{
struct fuse_forget_link *link;
struct virtio_fs_forget *forget;
+ struct virtio_fs_forget_req *req;
struct virtio_fs *fs;
struct virtio_fs_vq *fsvq;
u64 unique;
@@ -743,14 +749,15 @@ __releases(fiq->lock)
/* Allocate a buffer for the request */
forget = kmalloc(s...
2019 Oct 15
0
[PATCH 4/5] virtiofs: Count pending forgets as in_flight forgets
..._unlock(&fsvq->lock);
@@ -472,7 +467,7 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
fuse_request_end(fc, req);
spin_lock(&fsvq->lock);
- fsvq->in_flight--;
+ dec_in_flight_req(fsvq);
spin_unlock(&fsvq->lock);
}
}
@@ -730,6 +725,7 @@ __releases(fiq->lock)
list_add_tail(&forget->list, &fsvq->queued_reqs);
schedule_delayed_work(&fsvq->dispatch_work,
msecs_to_jiffies(1));
+ inc_in_flight_req(fsvq);
} else {
pr_debug("virtio-fs: Could not queue FORGET: err=%d. Dropping it.\n",
ret...
2019 Oct 30
0
[PATCH 1/3] virtiofs: Use a common function to send forget
...otify = virtqueue_kick_prepare(vq);
spin_unlock(&fsvq->lock);
-
- if (notify)
- virtqueue_notify(vq);
- pr_debug("virtio-fs: worker %s dispatched one forget request.\n",
- __func__);
+ if (send_forget_request(fsvq, forget, true))
+ return;
}
}
@@ -710,14 +730,9 @@ __releases(fiq->lock)
{
struct fuse_forget_link *link;
struct virtio_fs_forget *forget;
- struct scatterlist sg;
- struct scatterlist *sgs[] = {&sg};
struct virtio_fs *fs;
- struct virtqueue *vq;
struct virtio_fs_vq *fsvq;
- bool notify;
u64 unique;
- int ret;
link = fuse_dequeue_forget(...
2011 Sep 01
3
DOM0 Hang on a large box....
...ff8035969b: 0:_spin_lock+10b test %al, %al
@ ffffffff800342f5: 0:double_lock_balance+65 mov %rbx, %rdi
@ ffffffff80356fc0: 0:thread_return+37e mov 0x880(%r12), %edi
static int _double_lock_balance(struct rq *this_rq, struct rq *busiest)
__releases(this_rq->lock)
__acquires(busiest->lock)
__acquires(this_rq->lock)
{
int ret = 0;
if (unlikely(!spin_trylock(&busiest->lock))) {
if (busiest < this_rq) {
spin_unlock(&this_rq->lock);...
2019 Sep 05
0
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...e,
> > + .remove = virtio_fs_remove,
> > +#ifdef CONFIG_PM_SLEEP
> > + .freeze = virtio_fs_freeze,
> > + .restore = virtio_fs_restore,
> > +#endif
> > +};
> > +
> > +static void virtio_fs_wake_forget_and_unlock(struct fuse_iqueue *fiq)
> > +__releases(fiq->waitq.lock)
> > +{
> > + struct fuse_forget_link *link;
> > + struct virtio_fs_forget *forget;
> > + struct scatterlist sg;
> > + struct scatterlist *sgs[] = {&sg};
> > + struct virtio_fs *fs;
> > + struct virtqueue *vq;
> > + struct virti...
2019 Sep 05
38
[PATCH 00/18] virtiofs: Fix various races and cleanups round 1
Hi,
Michael Tsirkin pointed out issues w.r.t various locking related TODO
items and races w.r.t device removal.
In this first round of cleanups, I have taken care of most pressing
issues.
These patches apply on top of following.
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v4
I have tested these patches with mount/umount and device removal using
qemu monitor. For
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...LL */
Why?
> + .probe = virtio_fs_probe,
> + .remove = virtio_fs_remove,
> +#ifdef CONFIG_PM_SLEEP
> + .freeze = virtio_fs_freeze,
> + .restore = virtio_fs_restore,
> +#endif
> +};
> +
> +static void virtio_fs_wake_forget_and_unlock(struct fuse_iqueue *fiq)
> +__releases(fiq->waitq.lock)
> +{
> + struct fuse_forget_link *link;
> + struct virtio_fs_forget *forget;
> + struct scatterlist sg;
> + struct scatterlist *sgs[] = {&sg};
> + struct virtio_fs *fs;
> + struct virtqueue *vq;
> + struct virtio_fs_vq *fsvq;
> + bool notify;
>...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...LL */
Why?
> + .probe = virtio_fs_probe,
> + .remove = virtio_fs_remove,
> +#ifdef CONFIG_PM_SLEEP
> + .freeze = virtio_fs_freeze,
> + .restore = virtio_fs_restore,
> +#endif
> +};
> +
> +static void virtio_fs_wake_forget_and_unlock(struct fuse_iqueue *fiq)
> +__releases(fiq->waitq.lock)
> +{
> + struct fuse_forget_link *link;
> + struct virtio_fs_forget *forget;
> + struct scatterlist sg;
> + struct scatterlist *sgs[] = {&sg};
> + struct virtio_fs *fs;
> + struct virtqueue *vq;
> + struct virtio_fs_vq *fsvq;
> + bool notify;
>...
2016 Dec 06
0
[PATCH 04/10] drm/virtio: annotate virtio_gpu_queue_ctrl_buffer_locked
...4
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -297,6 +297,8 @@ void virtio_gpu_dequeue_cursor_func(struct work_struct *work)
static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
struct virtio_gpu_vbuffer *vbuf)
+ __releases(&vgdev->ctrlq.qlock)
+ __acquires(&vgdev->ctrlq.qlock)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
struct scatterlist *sgs[3], vcmd, vout, vresp;
--
MST
2019 Sep 05
0
[PATCH 03/18] virtiofs: Pass fsvq instead of vq as parameter to virtio_fs_enqueue_req
..._req *req)
for (i = 0; i < total_sgs; i++)
sgs[i] = &sg[i];
- fsvq = vq_to_fsvq(vq);
spin_lock(&fsvq->lock);
+ vq = fsvq->vq;
ret = virtqueue_add_sgs(vq, sgs, out_sgs, in_sgs, req, GFP_ATOMIC);
if (ret < 0) {
/* TODO handle full virtqueue */
@@ -824,7 +825,7 @@ __releases(fiq->waitq.lock)
/* TODO check for FR_INTERRUPTED? */
retry:
- ret = virtio_fs_enqueue_req(fs->vqs[queue_id].vq, req);
+ ret = virtio_fs_enqueue_req(&fs->vqs[queue_id], req);
if (ret < 0) {
if (ret == -ENOMEM || ret == -ENOSPC) {
/* Virtqueue full. Retry submission */...
2019 Sep 05
0
[PATCH 01/18] virtiofs: Remove request from processing list before calling end
...ow up.
Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
---
fs/fuse/virtio_fs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 197e79e536f9..a708ccb65662 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -826,6 +826,10 @@ __releases(fiq->waitq.lock)
}
req->out.h.error = ret;
pr_err("virtio-fs: virtio_fs_enqueue_req() failed %d\n", ret);
+ spin_lock(&fpq->lock);
+ clear_bit(FR_SENT, &req->flags);
+ list_del_init(&req->list);
+ spin_unlock(&fpq->lock);
fuse_request_end(...
2019 Sep 05
0
[PATCH 08/18] virtiofs: Drain all pending requests during ->remove time
...ct virtio_fs *fs)
{
@@ -511,6 +560,7 @@ static void virtio_fs_remove(struct virtio_device *vdev)
struct virtio_fs *fs = vdev->priv;
virtio_fs_stop_all_queues(fs);
+ virtio_fs_drain_all_queues(fs);
vdev->config->reset(vdev);
virtio_fs_cleanup_vqs(vdev, fs);
@@ -865,37 +915,6 @@ __releases(fiq->waitq.lock)
}
}
-static void virtio_fs_flush_hiprio_queue(struct virtio_fs_vq *fsvq)
-{
- struct virtio_fs_forget *forget;
-
- WARN_ON(fsvq->in_flight < 0);
-
- /* Go through pending forget requests and free them */
- spin_lock(&fsvq->lock);
- while (1) {
- forget = list_...
2019 Sep 05
0
[PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference
....c | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 85e2dcad68c1..04e2c000d63f 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -479,6 +479,11 @@ struct fuse_iqueue_ops {
*/
void (*wake_pending_and_unlock)(struct fuse_iqueue *fiq)
__releases(fiq->waitq.lock);
+
+ /**
+ * Put a reference on fiq_priv.
+ */
+ void (*put)(struct fuse_iqueue *fiq);
};
/** /dev/fuse input queue operations */
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 7fa0dcc6f565..70a433bdf01f 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -631,8 +6...