From: Eric Blake <eblake@redhat.com>
To: "Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
Denis Lunev <den@virtuozzo.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"mreitz@redhat.com" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] nbd-client: enable TCP keepalive
Date: Wed, 5 Jun 2019 12:12:56 -0500 [thread overview]
Message-ID: <19a96fc2-7f12-7b30-edef-b3da66eef759@redhat.com> (raw)
In-Reply-To: <e5a35aeb-21a4-449c-f8d5-9d2ac2968fd5@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
On 6/5/19 12:05 PM, Vladimir Sementsov-Ogievskiy wrote:
>> By enabling TCP keepalives we are explicitly making the connection
>> less reliable by forcing it to be terminated when keepalive
>> threshold triggers, instead of waiting longer for TCP to recover.
>>
>> The rationale s that once a connection has been in a hung state for
>> so long that keepalive triggers, its (hopefully) not useful to the
>> mgmt app to carry on waiting anyway.
>>
>> If the connection is terminated by keepalive & the mgmt app then
>> spawns a new client to carry on with the work, what are the risks
>> involved ? eg Could packets from the stuck, terminated, connection
>> suddenly arrive later and trigger I/O with outdated data payload ?
>
> Hmm, I believe that tcp guarantees isolation between different connections
>
>>
>> I guess this is no different a situation from an app explicitly
>> killing the QEMU NBD client process instead & spawning a new one.
>>
>> I'm still feeling a little uneasy about enabling it unconditionally
>> though, since pretty much everything I know which supports keepalives
>> has a way to turn them on/off at least, even if you can't tune the
>> individual timer settings.
>
> Hm. So, I can add bool keepalive parameter for nbd format with default to true.
> And if needed, it may be later extended to be qapi 'alternate' of bool or struct with
> three numeric parameters, corresponding to TCP_KEEPCNT, TCP_KEEPIDLE and TCP_KEEPINTVL .
>
> Opinions?
Adding a bool that could later turn into a qapi 'alternate' for
fine-tuning seems reasonable. Defaulting the bool to true is not
backwards-compatible; better would be defaulting it to false and letting
users opt-in; introspection will also work to let you know whether the
feature is present.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-05 17:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 10:09 [Qemu-devel] [PATCH 0/2] nbd: enable keepalive Vladimir Sementsov-Ogievskiy
2019-06-05 10:09 ` [Qemu-devel] [PATCH 1/2] io/channel: add qio_channel_set_keepalive Vladimir Sementsov-Ogievskiy
2019-06-05 14:38 ` Eric Blake
2019-06-05 16:07 ` Daniel P. Berrangé
2019-06-05 16:02 ` Daniel P. Berrangé
2019-06-05 16:10 ` Vladimir Sementsov-Ogievskiy
2019-06-05 10:09 ` [Qemu-devel] [PATCH 2/2] nbd-client: enable TCP keepalive Vladimir Sementsov-Ogievskiy
2019-06-05 14:39 ` Eric Blake
2019-06-05 14:43 ` Denis V. Lunev
2019-06-05 16:37 ` Daniel P. Berrangé
2019-06-05 17:05 ` Vladimir Sementsov-Ogievskiy
2019-06-05 17:12 ` Eric Blake [this message]
2019-06-05 17:28 ` Vladimir Sementsov-Ogievskiy
2019-06-05 17:36 ` Daniel P. Berrangé
2019-06-05 19:48 ` Eric Blake
2019-06-05 20:11 ` [Qemu-devel] nbd-server-add [was: [PATCH 2/2] nbd-client: enable TCP keepalive] Eric Blake
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=19a96fc2-7f12-7b30-edef-b3da66eef759@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=den@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).