All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: Eric Blake <eblake@redhat.com>,
	 qemu-devel@nongnu.org, kwolf@redhat.com,  hreitz@redhat.com,
	 berrange@redhat.com, qemu-block@nongnu.org,  den@virtuozzo.com,
	andrey.drobyshev@virtuozzo.com,  alexander.ivanov@virtuozzo.com
Subject: Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP
Date: Wed, 02 Oct 2024 17:14:42 +0200	[thread overview]
Message-ID: <87ed4ywn8d.fsf@pond.sub.org> (raw)
In-Reply-To: <a2747d44-9f1d-4bec-a9dd-c7e9f7363575@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Wed, 2 Oct 2024 16:58:10 +0300")

Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:

> On 02.10.24 16:49, Markus Armbruster wrote:
>> Eric Blake <eblake@redhat.com> writes:
>> 
>>> Although defaulting the handshake limit to 10 seconds was a nice QoI
>>> change to weed out intentionally slow clients, it can interfere with
>>> integration testing done with manual NBD_OPT commands over 'nbdsh
>>> --opt-mode'.  Expose a QMP knob 'handshake-max-secs' to allow the user
>>> to alter the timeout away from the default.
>>>
>>> The parameter name here intentionally matches the spelling of the
>>> constant added in commit fb1c2aaa98, and not the command-line spelling
>>> added in the previous patch for qemu-nbd; that's because in QMP,
>>> longer names serve as good self-documentation, and unlike the command
>>> line, machines don't have problems generating longer spellings.
>>>
>>> Signed-off-by: Eric Blake <eblake@redhat.com>

[...]

>> Are we confident we'll never need less than a full second?
>
> Hmm, recent "[PATCH v2] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'" shows that at least sometimes second is not enough precision.
>
> Maybe, using milliseconds consistently for all relatively short time intervals in QAPI would be a good rule?

Ideally, we'd use a single unit for time: nanoseconds.  But we missed
that chance long ago, and now are stuck with a mix of seconds,
milliseconds, microseconds, and nanoseconds.

I think a good rule is to pick the first from this list that will surely
provide all the precision we'll ever need.

In this case, milliseconds should do.



  reply	other threads:[~2024-10-02 15:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 16:14 [PATCH for-9.2 0/2] NBD: tune handshake timeout Eric Blake
2024-08-09 16:14 ` [PATCH 1/2] qemu-nbd: Allow users to adjust handshake limit Eric Blake
2024-10-02 12:41   ` Vladimir Sementsov-Ogievskiy
2024-08-09 16:14 ` [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP Eric Blake
2024-10-02 13:18   ` Vladimir Sementsov-Ogievskiy
2024-10-02 13:49   ` Markus Armbruster
2024-10-02 13:58     ` Vladimir Sementsov-Ogievskiy
2024-10-02 15:14       ` Markus Armbruster [this message]
2024-10-02 15:20         ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2025-02-03 22:26 [PATCH 0/2] nbd: Allow debugging tuning of handshake limit Eric Blake
2025-02-03 22:26 ` [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP Eric Blake
2025-02-05  6:55   ` Markus Armbruster
2025-02-05 20:36     ` Eric Blake
2025-02-06  5:54       ` Markus Armbruster
2025-02-06  7:20   ` Vladimir Sementsov-Ogievskiy
2025-02-10 21:46     ` Eric Blake
2025-02-12 14:33       ` Vladimir Sementsov-Ogievskiy

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=87ed4ywn8d.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=berrange@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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.