From: Vivek Goyal <vgoyal@redhat.com>
To: Tao Peng <bergwolf@hyper.sh>
Cc: virtio-fs@redhat.com, Peng Tao <tao.peng@linux.alibaba.com>
Subject: Re: [Virtio-fs] [PATCH] fuse: refcount FORGET requests
Date: Mon, 3 Jun 2019 09:10:09 -0400 [thread overview]
Message-ID: <20190603131009.GA18585@redhat.com> (raw)
In-Reply-To: <CACGKRzW9BpB_Vhp70y1ksHCdZZaamabhSZ4mLov_WV63C-KquA@mail.gmail.com>
On Sat, Jun 01, 2019 at 09:40:27AM +0800, Tao Peng wrote:
> On Sat, Jun 1, 2019 at 3:54 AM Liu Bo <bo.liu@linux.alibaba.com> wrote:
> >
> > On Fri, May 31, 2019 at 02:59:07PM -0400, Vivek Goyal wrote:
> > > On Fri, May 31, 2019 at 11:44:55AM -0700, Liu Bo wrote:
> > > > On Fri, May 31, 2019 at 09:22:28AM -0400, Vivek Goyal wrote:
> > > > > On Fri, May 31, 2019 at 05:24:03PM +0800, Peng Tao wrote:
> > > > > > Right now FORGET requests are not tracked and they might be sent
> > > > > > after DESTROY request.
> > > > >
> > > > > How does that happen?
> > > > >
> > > >
> > > > A bit more details, it is those FORGETs that remain in HIGHPRI vq,
> > > > sent before DESTROY but not yet processed by daemon before DESTROY
> > > > gets back to guest, then they get processed after the 2nd INIT.
> > >
> > > I just posted 3 patches to make sure forget request is not sent after
> > > destroy. Can you give it a try and see if it solves the problem.
> > >
> >
> > Sorry, somehow this can only be reproduced on Peng Tao's setup.
> >
> > > I also pushed my changes to this branch.
> > >
> > > https://github.com/rhvgoyal/linux/commits/flush-forget
> Hi Vivek,
>
> I looked at your patchset and I think the main issue is that there is
> already fc->num_waiting to track inflight requests. Yet you added
> virtio_fs_vq->in_flight to track vq requests and it is only used by
> the hiprio vq. You may think that it is only to track forget requests,
> but why inventing a specific wheel when there is a general one? The
> maintenance APIs for fc->num_waiting are already there and we don't
> need to re-implement the busy-waiting logic as is done in
> virtio_fs_flush_hiprio_queue(). The generic fuse code uses a waitqueue
> for that in fuse_wait_aborted().
I did the wait in virtio-fs for two reasons.
- Waiting for FORGET is need of virtio-fs and fuse never waited for
completion of FORGET requests. So if generic fuse does not care
about FORGET completion, it makes sense that virtio-fs takes care
of it.
- FUSE currently aborts existing requests if these are still on
internal list and have not been sent to user space. In case of virtio-fs
FORGET request is handed over to virtio-fs which might keep it on
internal list (because virtqueue is full) and there is no way to abort
it. Not that aborting forget is a must. So in that respect also it
did not gel well with generic fuse logic.
Anyway, I do not have strong opinions on this. Given waiting for FORGET
was virtio-fs requirement and not fuse reuiqrement, I thought it was
more appropriate that virtio-fs takes care of it.
Vivek
next prev parent reply other threads:[~2019-06-03 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 9:24 [Virtio-fs] [PATCH] fuse: refcount FORGET requests Peng Tao
2019-05-31 13:22 ` Vivek Goyal
2019-05-31 17:38 ` Liu Bo
2019-05-31 17:44 ` Vivek Goyal
2019-05-31 18:35 ` Liu Bo
2019-05-31 18:44 ` Liu Bo
2019-05-31 18:59 ` Vivek Goyal
2019-05-31 19:53 ` Liu Bo
2019-06-01 1:40 ` Tao Peng
2019-06-03 13:10 ` Vivek Goyal [this message]
2019-06-04 3:21 ` Tao Peng
2019-06-03 13:13 ` Vivek Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603131009.GA18585@redhat.com \
--to=vgoyal@redhat.com \
--cc=bergwolf@hyper.sh \
--cc=tao.peng@linux.alibaba.com \
--cc=virtio-fs@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.