From: Greg Kurz <groug@kaod.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Tuomas Tynkkynen <tuomas@tuxera.com>,
linux-fsdevel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] 9pfs hangs since 4.7
Date: Sat, 7 Jan 2017 16:10:45 +0100 [thread overview]
Message-ID: <20170107161045.742893b1@bahia.lan> (raw)
In-Reply-To: <20170107062647.GB12074@ZenIV.linux.org.uk>
On Sat, 7 Jan 2017 06:26:47 +0000
Al Viro <viro@ZenIV.linux.org.uk> wrote:
> On Fri, Jan 06, 2017 at 02:52:35PM +0100, Greg Kurz wrote:
>
> > Looking at the tag numbers, I think we're hitting the hardcoded limit of 128
> > simultaneous requests in QEMU (which doesn't produce any error, new requests
> > are silently dropped).
> >
> > Tuomas, can you change MAX_REQ to some higher value (< 65535 since tag is
> > 2-byte and 0xffff is reserved) to confirm ?
>
> Huh?
>
> Just how is a client supposed to cope with that behaviour? 9P is not
> SunRPC - there's a reason why it doesn't live on top of UDP. Sure, it's
> datagram-oriented, but it really wants reliable transport...
>
> Setting the ring size at MAX_REQ is fine; that'll give you ENOSPC on
> attempt to put a request there, and p9_virtio_request() will wait for
> things to clear, but if you've accepted a request, that's bloody it -
> you really should go and handle it.
>
Yes you're right and "dropped" in my previous mail meant "not accepted"
actually (virtqueue_pop() not called)... sorry for the confusion. :-\
> How does it happen, anyway? qemu-side, I mean... Does it move the buffer
> to used ring as soon as it has fetched the request? AFAICS, it doesn't -
> virtqueue_push() is called just before pdu_free(); we might get complications
> in case of TFLUSH handling (queue with MAX_REQ-1 requests submitted, TFLUSH
> arrives, cancel_pdu is found and ->cancelled is set on it, then v9fs_flush()
> waits for it to complete. Once the damn thing is done, buffer is released by
> virtqueue_push(), but pdu freeing is delayed until v9fs_flush() gets woken
> up. In the meanwhile, another request arrives into the slot of freed by
> that virtqueue_push() and we are out of pdus.
>
Indeed. Even if this doesn't seem to be the problem here, I guess this should
be fixed.
> So it could happen, and the things might get unpleasant to some extent, but...
> no TFLUSH had been present in all that traffic. And none of the stuck
> processes had been spinning in p9_virtio_request(), so they *did* find
> ring slots...
So we're back to your previous proposal of checking if virtqueue_kick() returned
false...
next prev parent reply other threads:[~2017-01-07 15:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 19:50 9pfs hangs since 4.7 Tuomas Tynkkynen
2016-11-29 16:39 ` Eric Van Hensbergen
2016-12-02 20:11 ` Tuomas Tynkkynen
2017-01-02 8:20 ` Tuomas Tynkkynen
2017-01-02 16:23 ` Al Viro
2017-01-03 23:34 ` Tuomas Tynkkynen
2017-01-04 1:47 ` Al Viro
2017-01-04 20:04 ` Tuomas Tynkkynen
2017-01-04 23:01 ` Al Viro
2017-01-06 13:52 ` [V9fs-developer] " Greg Kurz
2017-01-07 6:26 ` Al Viro
2017-01-07 15:10 ` Greg Kurz [this message]
2017-01-07 17:19 ` Al Viro
2017-01-07 18:15 ` Al Viro
2017-01-08 5:46 ` Al Viro
2017-01-10 8:16 ` Greg Kurz
2017-01-09 18:29 ` Greg Kurz
2017-01-09 18:39 ` Tuomas Tynkkynen
2017-01-09 20:05 ` Al Viro
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=20170107161045.742893b1@bahia.lan \
--to=groug@kaod.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tuomas@tuxera.com \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=viro@ZenIV.linux.org.uk \
/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.