Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5069936yba; Wed, 10 Apr 2019 10:39:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUxgQcw2c0/BUS0hqnFLk7pp1ya7UeyS7Dh6Dzmi9h6tfT7eUhMaLsNLWYBQgNz+pqFuqX X-Received: by 2002:a17:902:b481:: with SMTP id y1mr7283225plr.161.1554917965289; Wed, 10 Apr 2019 10:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554917965; cv=none; d=google.com; s=arc-20160816; b=VIYj2A2ujs/KpW0FyQRYCYBkjvfv0S+t2TQaca6KSSVFwSKm9Z8ukPUB63JLJVt/39 TiG8jy5nSM5OVaUfQ0mYVfbSZXpMvvPOsZjihoVZcgTwnmCPhncsDYT/bFyGLLNL9tmG 1M+t3mbs0ETBfSajtg9k0UM0B2Pym0jDPbAVhc3KpYNEZ52K1Igad63Nnu0YOvHM+k57 cRMQvVx6AD04OtD92ZaFU7zD4czLQecQU1QtKUQaecsXG3sKgaOQez/XjTpjmQ9WAlDo vXub2Moi1LBJe9jj+c8DrePouupaFDhTx5ZJEmrV6glj8WswZuw0x28PQxX61GLLQ62h MV5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+XQhHJQm0ddO90MHKaMiAhLuRoa5Q1cwmepr9DZq4g8=; b=klxeQzAlXmH9D0ITHBLQK7P15pp5jfUp9DveVGY1qYrUm10PvuIK9sGap+FeqrpwLp jmi42hmXDXPjDB7uOEdRyXA5FfolRtdu7qSfnP6SbYgyDHQ5xvPixpXccFhhTAOWH3MB UDnIOCYrhuDzmRDv13736fmcYVJvlmHAHkF3ycomFTRKgee3WnFjnQmKR51QVaW7nZEs CnvyQGhH+bke0aoSACzcZAgvGwSeHnyRCLn+xHDfrmPVmuzjkMkgMocXnIZiW+z4Ewj6 sf/1fSGWJqFZHZv17o5PT2TTojPWp59BDKbjZ70oOODFSFmjdst5agyYxFh+2J//T60N c1Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=byWdSdBr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si29028306pgq.213.2019.04.10.10.39.09; Wed, 10 Apr 2019 10:39:25 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=byWdSdBr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732630AbfDJOS4 (ORCPT + 99 others); Wed, 10 Apr 2019 10:18:56 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40101 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731287AbfDJOSz (ORCPT ); Wed, 10 Apr 2019 10:18:55 -0400 Received: by mail-pl1-f194.google.com with SMTP id b3so1521838plr.7 for ; Wed, 10 Apr 2019 07:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+XQhHJQm0ddO90MHKaMiAhLuRoa5Q1cwmepr9DZq4g8=; b=byWdSdBrVXsB6nM6gY6PtteabTNB0rScomQUhi9qwW5Ag+qlQ9ByF2KacvVY1M2l2V gDkAiGEdGyXjcXNvQvOWPsybNUCwNPlw6eRAUjrOZd54FEDipql8V/E0VMi1fvcZ8Gs+ XGyfbbz+AXPYTwh3WkbW1YYR3OW3aAhUjWgAywleOHXYyU6j1UfE7qYILNJt65A8odic ONE3EJ5HDUUwwvy3VkqlpOdFh8MLmp9mahGZE59UIOIBcrYjhkuV+A5Yr1CApwGr30Gd Pg3obzeXsGAoCWRkwfjZsxJoYAirJrSI9532sg1lYCCkPTtJwBkcNrKSfxei2NCc9Cjv X72g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+XQhHJQm0ddO90MHKaMiAhLuRoa5Q1cwmepr9DZq4g8=; b=DG/v/ZGaWg5BPEkeQldFAKO3oWKVBuiA5Sf4WDpDRWKLDCWKVYzDs8zr4iVBJ4VWMH rC34I2AoV+yMWbqm6k/QTazVqzePHeET47sneRTC3nbhQMP46WjTlb8CEuQF4PXBo9Qh HiutQjWqbuVoqWxlwkBvWPIibSOdISXMqDjKCtvpqY70a6u+fR0w8RY4xBK+GWdk6BeI dhMCso3K6HJDCNHx+olUDiGoZJI4jqZIw4K0tv0Qa0pQ64joCgaFVtAQfei+IqZ73WWe iW79OrRu+U1pVhzhFzfb2xjTpaLsAtj/hYdBsgsK10vLJSghO6ND53ilK3HD7wydY89w FGDg== X-Gm-Message-State: APjAAAX//YgsIsLGiG2g547RjmqZkGNyqx5ZvN2WiIDRKJEAbmDtPW5o rPPzz7Ou3WSWmPZSUjBhUzbNn5oQQn4zKA== X-Received: by 2002:a17:902:b715:: with SMTP id d21mr45017137pls.103.1554905933766; Wed, 10 Apr 2019 07:18:53 -0700 (PDT) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id d15sm51575592pfo.34.2019.04.10.07.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 07:18:52 -0700 (PDT) Subject: Re: [PATCH 0/2] Limit number of hw queues by nr_cpu_ids for virtio-blk and virtio-scsi To: Dongli Zhang , linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org Cc: mst@redhat.com, jasowang@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, cohuck@redhat.com, linux-kernel@vger.kernel.org References: <1553682995-5682-1-git-send-email-dongli.zhang@oracle.com> From: Jens Axboe Message-ID: <47e8d8bf-1820-5cb4-ac78-1bcd5ea26c49@kernel.dk> Date: Wed, 10 Apr 2019 08:18:50 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1553682995-5682-1-git-send-email-dongli.zhang@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/27/19 4:36 AM, 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 use by > virtio-blk/virtio-scsi, as they both have (tag_set->nr_maps == 1), they > can use at most nr_cpu_ids hw queues. > > In addition, specifically for pci scenario, when the 'num-queues' specified > by qemu is more than maxcpus, virtio-blk/virtio-scsi would not be able to > allocate more than maxcpus vectors in order to have a vector for each > queue. As a result, they fall back into MSI-X with one vector for config > and one shared for queues. > > Considering above reasons, this patch set limits the number of hw queues > used by nr_cpu_ids for both virtio-blk and virtio-scsi. I picked both up for 5.1. -- Jens Axboe