All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>,
	Jason Wang <jasowang@redhat.com>
Cc: virtualization <virtualization@lists.linux-foundation.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: Virtio-net - add timeouts to control commands
Date: Wed, 24 Aug 2022 11:24:53 +0200	[thread overview]
Message-ID: <bedae890-80e6-9777-caff-98749d46ba3b@suse.de> (raw)
In-Reply-To: <CAJs=3_Cnf29Om2yB=JkdASuu=YBPRmZ4i7ncFfTzrftTkYZVmQ@mail.gmail.com>

On 8/24/22 11:16, Alvaro Karsz wrote:
> Hi Jason,
> 
>> Or reset but can we simply use interrupt instead of the busy waiting?
> 
> I agree that timeouts are not needed using interrupts.

Quite the contrary.
There is no guarantee that a completion for a given command will be 
signaled at all; if the completion is never posted to the virtio queue 
the VM will spin forever.

> This can be done, but seems like a big change.
> All functions calling virtnet_send_command expect to get a response immediately.
> This may be difficult, since some of the commands are sent in the
> probe function.

This is a simplistic approach. _Any_ command sent via virtio will have 
to have some sort of handling in the host, so an immediate response is 
not guaranteed.
Especially virtio-block command will _not_ be handled immediately.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-08-24  9:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  7:51 Virtio-net - add timeouts to control commands Alvaro Karsz
2022-08-24  9:06 ` Jason Wang
2022-08-24  9:16   ` Alvaro Karsz
2022-08-24  9:24     ` Hannes Reinecke [this message]
2022-08-24  9:48       ` Alvaro Karsz
2022-08-25  2:27     ` Jason Wang
2022-08-24  9:21   ` Hannes Reinecke
2022-08-24  9:42     ` Alvaro Karsz
2022-08-24 10:19       ` Hannes Reinecke
2022-08-24 10:31         ` Alvaro Karsz
2022-08-25  3:01       ` Jason Wang

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=bedae890-80e6-9777-caff-98749d46ba3b@suse.de \
    --to=hare@suse.de \
    --cc=alvaro.karsz@solid-run.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.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.