From: Greg Kurz <groug@kaod.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Keno Fischer <keno@juliacomputing.com>,
stefano@aporeto.com, qemu-devel@nongnu.org,
aneesh.kumar@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2] 9pfs: Correctly handle cancelled requests
Date: Wed, 13 Dec 2017 14:57:47 +0100 [thread overview]
Message-ID: <20171213145747.47832f65@bahia.lan> (raw)
In-Reply-To: <alpine.DEB.2.10.1712121508370.8052@sstabellini-ThinkPad-X260>
On Tue, 12 Dec 2017 15:14:06 -0800 (PST)
Stefano Stabellini <sstabellini@kernel.org> wrote:
> On Fri, 8 Dec 2017, Greg Kurz wrote:
> > Cc'ing Stefano using a more appropriate address :)
>
> Thanks Greg for the ping, one comment inline below.
>
[...]
>
> I think we also need to:
>
> /* this is required to consume the request */
> ring->intf->out_cons = ring->out_cons;
> xen_wmb();
>
> /* this is required to complete the cancellation of the pdu operation */
> ring->inprogress = false;
>
> /* this is required to let the other end know that there is more
> * space on the ring available */
> xenevtchn_notify(ring->evtchndev, ring->local_port);
>
That makes me think that we should also probably notify the guest with
virtio since this isn't a reset... :)
> /* trigger the read of the next request */
> qemu_bh_schedule(ring->bh);
>
>
> Which is basically almost everything else from xen_9pfs_push_and_notify,
> except the modification of in_prod, because we are not going to write
> back anything to the ring.
>
... in which case, the same statement stands for virtio_9pfs_push_and_notify()
We should probably unify push_and_notify and discard into a single operation:
- void (*push_and_notify)(V9fsPDU *pdu);
+ void (*return_to_guest)(V9fsPDU *pdu, bool discard);
Let's do this in a separate patch, and respin this fix on top.
>
>
> > > > +}
> > > > +
> > > > static const struct V9fsTransport xen_9p_transport = {
> > > > .pdu_vmarshal = xen_9pfs_pdu_vmarshal,
> > > > .pdu_vunmarshal = xen_9pfs_pdu_vunmarshal,
> > > > .init_in_iov_from_pdu = xen_9pfs_init_in_iov_from_pdu,
> > > > .init_out_iov_from_pdu = xen_9pfs_init_out_iov_from_pdu,
> > > > .push_and_notify = xen_9pfs_push_and_notify,
> > > > + .discard = xen_9pfs_discard,
> > > > };
> > > >
> > > > static int xen_9pfs_init(struct XenDevice *xendev)
>
next prev parent reply other threads:[~2017-12-13 13:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 20:36 [Qemu-devel] [PATCH v2] 9pfs: Correctly handle cancelled requests Keno Fischer
2017-12-07 17:04 ` Greg Kurz
2017-12-08 6:57 ` Greg Kurz
2017-12-12 23:14 ` Stefano Stabellini
2017-12-13 13:57 ` Greg Kurz [this message]
2017-12-20 12:54 ` Greg Kurz
2018-01-11 0:17 ` Stefano Stabellini
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=20171213145747.47832f65@bahia.lan \
--to=groug@kaod.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=keno@juliacomputing.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=stefano@aporeto.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.