Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4868762yba; Wed, 10 Apr 2019 06:40:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCMahoqfBTXGVGtCU0+njMKU7samOKUBG2swWuduDgowRxzSP/Q28vN5denXsQXL+Zg39d X-Received: by 2002:a62:571b:: with SMTP id l27mr43607831pfb.195.1554903600279; Wed, 10 Apr 2019 06:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554903600; cv=none; d=google.com; s=arc-20160816; b=DlcfJYdG+aJ4tdfl1k+zbUNA5sP1NcsSPg7qN5/R4693crwdV5TLW/n82cgYaokefP hMx+ybrvJdxJkiq78q6wy7C/5v+EMN294XV3kRw/0S8877803Zk7JnTJzl/Qi4lm7HIT G94Jcgjq5ekWs8YC7KqwdsxsfGkl+22KIANhJTYxi5Ftp/22iMTqGFRA+fHsdEChy+SW /yaP3hhmapnV9McIrzV3Y7P2vuE3jnjpb6aiw70EGlQkbYa0KBevYBk8jlPRh8wHvGAM AQGu4ydDLAzb0SXB1XlUyM6rYfrMr62b8CfyhOYVBO+eu2smoQDnqHdhvf2/W2ZiNKCu SgRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zTSlXEh2iIU3s6v+N0s988GiASk9XuTw1xpaN768zj0=; b=AU8MEOEkDK+iA2vW4n0H41efOodwmt3LtLREu9y6eaS4bMEsqDsB2dObw9Y+HMRkDc bu7zKKl3bS5ZGVazhZnCDrpuD1VOByiWTvA0W8/sdUNSNvqxIDiRC2svnqD8HyZZ9Hlr 8sJkHaUMyoer8M4VfVXU15KMWwbGUC9Iz8CFj5cIzQXbn6WX3JNFfId0ze1u95hwyoMe ungx5byj82T2xfru5YRp1pqhmam/+P8iFz6cQkHIunVZ/QXFvcAYhRr6+YPJK+AktKvz iHNoow1erJFzll5S00FjNgDvLhk+nHM8x5t2vSuzIAUkUhGf6EotWxauHFlL2FiNNCNo c20g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si25804706plp.341.2019.04.10.06.39.44; Wed, 10 Apr 2019 06:40:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730227AbfDJNMb (ORCPT + 99 others); Wed, 10 Apr 2019 09:12:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729013AbfDJNMb (ORCPT ); Wed, 10 Apr 2019 09:12:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DAF913084248; Wed, 10 Apr 2019 13:12:30 +0000 (UTC) Received: from localhost (ovpn-117-202.ams2.redhat.com [10.36.117.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id E773F5D961; Wed, 10 Apr 2019 13:12:26 +0000 (UTC) Date: Wed, 10 Apr 2019 14:12:25 +0100 From: Stefan Hajnoczi To: Dongli Zhang Cc: linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, axboe@kernel.dk, jejb@linux.ibm.com, martin.petersen@oracle.com, cohuck@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] virtio-blk: limit number of hw queues by nr_cpu_ids Message-ID: <20190410131225.GA8210@stefanha-x1.localdomain> References: <1553682995-5682-1-git-send-email-dongli.zhang@oracle.com> <1553682995-5682-2-git-send-email-dongli.zhang@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <1553682995-5682-2-git-send-email-dongli.zhang@oracle.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 10 Apr 2019 13:12:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 27, 2019 at 06:36:34PM +0800, Dongli Zhang wrote: > When tag_set->nr_maps is 1, the block layer limits the number of hw queues > by nr_cpu_ids. No matter how many hw queues are used by virtio-blk, as it > has (tag_set->nr_maps =3D=3D 1), it can use at most nr_cpu_ids hw queues. >=20 > In addition, specifically for pci scenario, when the 'num-queues' specifi= ed > by qemu is more than maxcpus, virtio-blk would not be able to allocate mo= re > than maxcpus vectors in order to have a vector for each queue. As a resul= t, > it falls back into MSI-X with one vector for config and one shared for > queues. >=20 > Considering above reasons, this patch limits the number of hw queues used > by virtio-blk by nr_cpu_ids. >=20 > Signed-off-by: Dongli Zhang > --- > drivers/block/virtio_blk.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Stefan Hajnoczi --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcreu5AAoJEJykq7OBq3PIv1QH/3Xfhaaouf6EN6cUvjc1C8S5 zptX9W26vBX9yhTbAcJTDQ8ETXOri7HIE0e6fGMPUPc5TQQlShnC74b7d8aUqFS2 lxl08VctShlE+vB3YVP5K6FOZ82sHszI+uZde/rTt+2+wZqcOqNz0rzi5H+GwZRQ QwC3c/Juo/wdG48aWliZrQDApazeKf/2YY+LBqj43Wk7F+X5X65SEiuQkY2xzp0t VFLrAGxycRpiL0JBTnXf4VtmP+vox26KmLtccRVZktcgckHuexe05nMGFVhy30aB PkQCu7gUEV9AC6kNT4fO6GML6EPHNWnrGRg4qbgZ0htLuQpDTUYonrOR3q3cDkc= =TWiv -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--