From: "Michael S. Tsirkin" <mst@redhat.com>
To: Pierre Morel <pmorel@linux.vnet.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] [RFC] virtio: Limit the retries on a virtio device reset
Date: Fri, 25 Aug 2017 00:16:05 +0300 [thread overview]
Message-ID: <20170825001411-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <d75121e6-5685-295a-7430-6aa8d713060b@linux.vnet.ibm.com>
On Thu, Aug 24, 2017 at 07:07:42PM +0200, Pierre Morel wrote:
> > - we'll have to spread these tests all over the place.
>
> I counted 19 places where to check if the reset went OK.
>
> None of them touch the device anymore after reset and just free driver's
> resources.
... and then hypervisor uses the resources after free. Not good.
> So that if reset failed, nothing goes wrong, no device access, but the
> probability that the next probe fail is high. (If it ever succeed).
>
> > Allowing reset to fail would be better.
>
> May be I did not understand what you mean.
> Testing the flag or a return value is as expensive.
>
> Of course the implementation is a mater of taste.
If a function can fail it should return an error, not just set a flag.
> I notice two other things to do:
>
> - May be adding a warning would be fine too.
> - Virtio_ccw may add a fail flag when allocation of CCW failed.
> I did not find anything to do for virtio_mmio or legacy virtio_pci.
>
> Regards,
>
> Pierre
next prev parent reply other threads:[~2017-08-24 21:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 16:33 [PATCH] [RFC] virtio: Limit the retries on a virtio device reset Pierre Morel
2017-08-24 11:07 ` Cornelia Huck
2017-08-24 12:16 ` Pierre Morel
2017-08-24 14:12 ` Michael S. Tsirkin
2017-08-24 17:07 ` Pierre Morel
2017-08-24 21:16 ` Michael S. Tsirkin [this message]
2017-08-25 8:26 ` Cornelia Huck
2017-08-25 11:21 ` Pierre Morel
2017-08-25 16:43 ` Michael S. Tsirkin
2017-08-24 14:19 ` Michael S. Tsirkin
2017-08-24 17:42 ` Pierre Morel
2017-08-24 21:23 ` Michael S. Tsirkin
2017-08-25 8:33 ` Pierre Morel
2017-08-25 16:46 ` Michael S. Tsirkin
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=20170825001411-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=cohuck@redhat.com \
--cc=pmorel@linux.vnet.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
/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.