qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Dan Aloni <dan@kernelim.com>
Cc: qemu-devel@nongnu.org, Alex Friedman <alex@e8storage.com>,
	Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] [PATCH] nvme: Fix get/set number of queues feature, again
Date: Tue, 22 Aug 2017 11:37:31 +0100	[thread overview]
Message-ID: <20170822103731.GD16799@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170528130649.28168-1-dan@kernelim.com>

On Sun, May 28, 2017 at 04:06:49PM +0300, Dan Aloni wrote:
> The number of queues that should be return by the admin command should:
> 
>   1) Only mention the number of non-admin queues.
>   2) It is zero-based, meaning that '0 == one non-admin queue',
>      '1 == two non-admin queues', and so forth.
> 
> Because our `num_queues` means the number of queues _plus_ the admin
> queue, then the right calculation for the number returned from the admin
> command is `num_queues - 2`, combining the two requirements mentioned.
> 
> The issue was discovered by reducing num_queues from 64 to 8 and running
> a Linux VM with an SMP parameter larger than that (e.g. 22). It tries to
> utilize all queues, and therefore fails with an invalid queue number
> when trying to queue I/Os on the last queue.
> 
> Signed-off-by: Dan Aloni <dan@kernelim.com>
> CC: Alex Friedman <alex@e8storage.com>
> CC: Keith Busch <keith.busch@intel.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/block/nvme.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Sorry for the delay.  Please send future nvme.c patches through Kevin
Wolf:

$ scripts/get_maintainer.pl -f hw/block/nvme.c
Keith Busch <keith.busch@intel.com> (supporter:nvme)
Kevin Wolf <kwolf@redhat.com> (supporter:Block layer core)
Max Reitz <mreitz@redhat.com> (supporter:Block layer core)
qemu-block@nongnu.org (open list:nvme)
qemu-devel@nongnu.org (open list:All patches CC here)

This patch will be in QEMU 2.11.

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

      parent reply	other threads:[~2017-08-22 10:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 13:06 [Qemu-devel] [PATCH] nvme: Fix get/set number of queues feature, again Dan Aloni
2017-06-19 14:50 ` Keith Busch
2017-08-21 13:09 ` Christoph Hellwig
2017-08-22 10:37 ` Stefan Hajnoczi [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=20170822103731.GD16799@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=alex@e8storage.com \
    --cc=dan@kernelim.com \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --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).