qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Dirk Müller" <dmueller@suse.de>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] Only advertise aio=io_uring if support is actually available
Date: Mon, 25 Apr 2022 17:04:14 -0500	[thread overview]
Message-ID: <20220425220414.seud4bu4kojxeajd@redhat.com> (raw)
In-Reply-To: <YmaDrJF95PnDP+IU@redhat.com>

On Mon, Apr 25, 2022 at 12:19:08PM +0100, Daniel P. Berrangé wrote:
> On Fri, Apr 22, 2022 at 03:30:46PM -0500, Eric Blake wrote:
> > On Thu, Apr 21, 2022 at 02:27:55PM -0500, Eric Blake wrote:
> > > On Thu, Apr 21, 2022 at 06:50:48PM +0200, Dirk Müller wrote:
> > > > Change --help output for aio option to only list the aio backend options that
> > > > are actually available. io_uring is an optional, linux only backend
> > > > option so hide it for cases where it isn't there.
> > > 
> > > As pointed out by Dan, this commit message is not quite accurate.  It
> > > hides only one of the two conditional options, but 'native' is also a
> > > Linux-only optional backend (CONFIG_LINUX_AIO).
> > 
> > Stepping back a bit - we already said that making --help
> > machine-parseable is a non-goal, and so the intent of this patch is
> > for human readers.  But adding an #ifdef ladder to show all 4 possible
> > combinations gets hairy; adding another option turns it into 8
> > combinations.  Is there a better way
> > 
> > What if we just document ALL strings possible in at least one build
> > (no #ifdef ladder in the help text), but add --aio=help as a way to do
> > a runtime list of which aio modes are understood by THIS build?  It
> > would match how we have --device=help for qemu proper, and may even be
> > able to reuse some of that framework code (for parsing out when help
> > is requested).
> 
> Did you literally mean '--aio=help' ?  'aio' is just an option
> for disks, and I don't think we want new top levelk options. So
> would have to be '-drive ....,aio=help', or '--blockdev ....aio=help'
> the latter gets tricky with nested json syntax though, so not sure
> it is nicer.

For qemu-nbd, it literally is:

      --aio=MODE            set AIO mode (native, io_uring or threads)

so adding --aio=help is already a top-level option there.  But for
other utilities, you are right that it is a per-device option, and not
a top-level thing (qemu-nbd is weird because it exposes exactly one
device).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



      reply	other threads:[~2022-04-25 22:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 16:50 [PATCH v2] Only advertise aio=io_uring if support is actually available Dirk Müller
2022-04-21 19:27 ` Eric Blake
2022-04-22 20:30   ` Eric Blake
2022-04-25 11:19     ` Daniel P. Berrangé
2022-04-25 22:04       ` Eric Blake [this message]

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=20220425220414.seud4bu4kojxeajd@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dmueller@suse.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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 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).