Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932227AbaFQCk6 (ORCPT ); Mon, 16 Jun 2014 22:40:58 -0400 Received: from mail-oa0-f47.google.com ([209.85.219.47]:39555 "EHLO mail-oa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754019AbaFQCk5 (ORCPT ); Mon, 16 Jun 2014 22:40:57 -0400 MIME-Version: 1.0 In-Reply-To: <1402680562-8328-3-git-send-email-ming.lei@canonical.com> References: <1402680562-8328-1-git-send-email-ming.lei@canonical.com> <1402680562-8328-3-git-send-email-ming.lei@canonical.com> Date: Tue, 17 Jun 2014 10:40:56 +0800 Message-ID: Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device From: Stefan Hajnoczi To: Ming Lei Cc: Jens Axboe , linux-kernel , "Michael S. Tsirkin" , linux-api@vger.kernel.org, Linux Virtualization , Stefan Hajnoczi , Paolo Bonzini 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 Sat, Jun 14, 2014 at 1:29 AM, Ming Lei wrote: > Firstly this patch supports more than one virtual queues for virtio-blk > device. > > Secondly this patch maps the virtual queue to blk-mq's hardware queue. > > With this approach, both scalability and performance problem can be improved. > > Signed-off-by: Ming Lei > --- > drivers/block/virtio_blk.c | 75 ++++++++++++++++++++++++++++++++------------ > 1 file changed, 55 insertions(+), 20 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index f63d358..e0d077d 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -16,6 +16,8 @@ > > #define PART_BITS 4 > > +#define MAX_NUM_VQ 16 It would be nice to allocate virtqueues dynamically instead of hardcoding the limit. virtio-scsi also allocates virtqueues dynamically. Stefan -- 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/