All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/iscsi: handle zero events from iscsi_which_events
Date: Wed, 08 Apr 2015 21:36:01 +0200	[thread overview]
Message-ID: <55258321.3090706@kamp.de> (raw)
In-Reply-To: <CAJSP0QUut5zdLB+5COF00crVh=LK-B6RUmUV2CXka4ZEUosu=w@mail.gmail.com>

Am 08.04.2015 um 21:22 schrieb Stefan Hajnoczi:
> On Wed, Apr 8, 2015 at 6:08 PM, ronnie sahlberg
> <ronniesahlberg@gmail.com> wrote:
>> The nice part with the current patch of Peter is that qemu and
>> libiscsi can be upgraded/downgraded independently.
> That's fine for avoiding hassles for existing apps, like QEMU, and I'm
> happy to merge the patch.
>
> For the library's API design it would be return the timeout so that
> new applications can avoid polling, but that's just a suggestion.

You are right. Paolo also brought up this idea, but as Ronnie said the
idea was not to bump the API version. The whole async reconnect stuff
works without a change in the client.

But polling every 250ms is magnitutes better than having a hung Qemu :-)
If you feel 250ms is too often we could also go to 1000ms. The timeout
we are talking about is in the order of 1-30 seconds. It only happens when
a reconnect is initiated either bei Qemu (due to NOP timeout) or libiscsi (protocol,
socket error etc.) and the first reconnect try is not successful.

Another idea I had was to encode the timeout in the return value of iscsi_which_events.
This would work with all Qemu versions, but I do not know how poll reacts if it gets
unknown events passed. So all users other than Qemu that pass the result of iscsi_which_events
directly to poll would need to mask the result. Thats not a problem for the tools provided with libiscsi,
but I do not know how much other real users except Qemu are out there?

Peter

  reply	other threads:[~2015-04-08 19:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1428437295-29577-1-git-send-email-pl@kamp.de>
2015-04-08  8:38 ` [Qemu-devel] [Qemu-block] [PATCH] block/iscsi: handle zero events from iscsi_which_events Stefan Hajnoczi
2015-04-08 17:08   ` ronnie sahlberg
2015-04-08 19:22     ` Stefan Hajnoczi
2015-04-08 19:36       ` Peter Lieven [this message]
2015-04-09  9:24 ` Stefan Hajnoczi

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=55258321.3090706@kamp.de \
    --to=pl@kamp.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=stefanha@gmail.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.