Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933665AbaFQQAN (ORCPT ); Tue, 17 Jun 2014 12:00:13 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50223 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933335AbaFQQAJ (ORCPT ); Tue, 17 Jun 2014 12:00:09 -0400 MIME-Version: 1.0 In-Reply-To: <53A06475.7000308@redhat.com> References: <1402680562-8328-1-git-send-email-ming.lei@canonical.com> <1402680562-8328-3-git-send-email-ming.lei@canonical.com> <53A06475.7000308@redhat.com> Date: Wed, 18 Jun 2014 00:00:07 +0800 Message-ID: Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device From: Ming Lei To: Paolo Bonzini Cc: Stefan Hajnoczi , Jens Axboe , linux-kernel , "Michael S. Tsirkin" , linux-api@vger.kernel.org, Linux Virtualization , Stefan Hajnoczi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 17, 2014 at 11:53 PM, Paolo Bonzini wrote: > Il 17/06/2014 17:50, Ming Lei ha scritto: > >>> > It would be nice to allocate virtqueues dynamically instead of >>> > hardcoding the limit. virtio-scsi also allocates virtqueues >>> > dynamically. >> >> virtio-scsi may have lots of LUN, but virtio-blk only has one disk >> which needn't lots of hardware queues. > > > If you want to do queue steering based on the guest VCPU number, the number > of queues must be = to the number of VCPUs shouldn't it? > > I tried using a divisor of the number of VCPUs, but couldn't get the block > layer to deliver interrupts to the right VCPU. For blk-mq's hardware queue, that won't be necessary to equal to VCPUs number, and irq affinity per hw queue can be simply set as blk_mq_hw_ctx->cpumask. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/