From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D295BC433DB for ; Tue, 19 Jan 2021 04:07:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ED4A20867 for ; Tue, 19 Jan 2021 04:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729915AbhASEGy (ORCPT ); Mon, 18 Jan 2021 23:06:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47329 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730144AbhASEGC (ORCPT ); Mon, 18 Jan 2021 23:06:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611029064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=06PtBYn0LQuzQkFBF6fgOmSrDr0QFcSFZEJebEBQ7c4=; b=jA4PUziMhQsEpNskF1qaIZFtO+TqBCNd/YlM68bR+QRB8ceVyMJ23oo59NolM9BmPREKgo 0cAvepNROjMfKbKQ7NoA6NO5DhSxJKRYuN+xATEgh4Uun1M5Ml7XblpkRb17LiPhd2Qasb vvp2++kM+aq+8Z0hTYgutjQmjRUOTzU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-6Quo4kc8PtKdLji77ZRl7w-1; Mon, 18 Jan 2021 23:04:22 -0500 X-MC-Unique: 6Quo4kc8PtKdLji77ZRl7w-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D05F10054FF; Tue, 19 Jan 2021 04:04:21 +0000 (UTC) Received: from [10.72.13.139] (ovpn-13-139.pek2.redhat.com [10.72.13.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DEAC5D9CD; Tue, 19 Jan 2021 04:04:16 +0000 (UTC) Subject: Re: [PATCH RFC] virtio-blk: support per-device queue depth To: Joseph Qi , "Michael S. Tsirkin" Cc: virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, Jeffle Xu References: <1610942338-78252-1-git-send-email-joseph.qi@linux.alibaba.com> <9a736867-d420-26eb-3ee2-42869a069640@linux.alibaba.com> From: Jason Wang Message-ID: <814df55b-68cf-189c-66e3-29f02f3d6b62@redhat.com> Date: Tue, 19 Jan 2021 12:04:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9a736867-d420-26eb-3ee2-42869a069640@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 2021/1/18 下午2:06, Joseph Qi wrote: > Hi Jason, > > On 1/18/21 1:25 PM, Jason Wang wrote: >> On 2021/1/18 上午11:58, Joseph Qi wrote: >>> module parameter 'virtblk_queue_depth' was firstly introduced for >>> testing/benchmarking purposes described in commit fc4324b4597c >>> ("virtio-blk: base queue-depth on virtqueue ringsize or module param"). >>> Since we have different virtio-blk devices which have different >>> capabilities, it requires that we support per-device queue depth instead >>> of per-module. So defaultly use vq free elements if module parameter >>> 'virtblk_queue_depth' is not set. >> >> I wonder if it's better to use sysfs instead (or whether it has already had something like this in the blocker layer). >> > Thanks for quick response. > Do you mean adjust /sys/block/vdX/queue/nr_requests? > But current logic in virtblk_probe() is, virtblk_queue_depth is > used as a saved value for first probed vdev, not purely module > parameter. Right, I see. So I think the patch is fine. Thanks > > Thanks, > Joseph > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_RED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56A2FC433E0 for ; Tue, 19 Jan 2021 04:04:32 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0778205CB for ; Tue, 19 Jan 2021 04:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0778205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 110CD23492; Tue, 19 Jan 2021 04:04:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mb-POWo09FcM; Tue, 19 Jan 2021 04:04:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id C8EB7232D2; Tue, 19 Jan 2021 04:04:27 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B34C8C088B; Tue, 19 Jan 2021 04:04:27 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id E8F36C013A for ; Tue, 19 Jan 2021 04:04:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D4A0F8614D for ; Tue, 19 Jan 2021 04:04:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O7-R0qufubm6 for ; Tue, 19 Jan 2021 04:04:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9A6EC860F9 for ; Tue, 19 Jan 2021 04:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611029064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=06PtBYn0LQuzQkFBF6fgOmSrDr0QFcSFZEJebEBQ7c4=; b=jA4PUziMhQsEpNskF1qaIZFtO+TqBCNd/YlM68bR+QRB8ceVyMJ23oo59NolM9BmPREKgo 0cAvepNROjMfKbKQ7NoA6NO5DhSxJKRYuN+xATEgh4Uun1M5Ml7XblpkRb17LiPhd2Qasb vvp2++kM+aq+8Z0hTYgutjQmjRUOTzU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-6Quo4kc8PtKdLji77ZRl7w-1; Mon, 18 Jan 2021 23:04:22 -0500 X-MC-Unique: 6Quo4kc8PtKdLji77ZRl7w-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D05F10054FF; Tue, 19 Jan 2021 04:04:21 +0000 (UTC) Received: from [10.72.13.139] (ovpn-13-139.pek2.redhat.com [10.72.13.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DEAC5D9CD; Tue, 19 Jan 2021 04:04:16 +0000 (UTC) Subject: Re: [PATCH RFC] virtio-blk: support per-device queue depth To: Joseph Qi , "Michael S. Tsirkin" References: <1610942338-78252-1-git-send-email-joseph.qi@linux.alibaba.com> <9a736867-d420-26eb-3ee2-42869a069640@linux.alibaba.com> From: Jason Wang Message-ID: <814df55b-68cf-189c-66e3-29f02f3d6b62@redhat.com> Date: Tue, 19 Jan 2021 12:04:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9a736867-d420-26eb-3ee2-42869a069640@linux.alibaba.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Cc: linux-block@vger.kernel.org, virtualization@lists.linux-foundation.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" Ck9uIDIwMjEvMS8xOCDkuIvljYgyOjA2LCBKb3NlcGggUWkgd3JvdGU6Cj4gSGkgSmFzb24sCj4K PiBPbiAxLzE4LzIxIDE6MjUgUE0sIEphc29uIFdhbmcgd3JvdGU6Cj4+IE9uIDIwMjEvMS8xOCDk uIrljYgxMTo1OCwgSm9zZXBoIFFpIHdyb3RlOgo+Pj4gbW9kdWxlIHBhcmFtZXRlciAndmlydGJs a19xdWV1ZV9kZXB0aCcgd2FzIGZpcnN0bHkgaW50cm9kdWNlZCBmb3IKPj4+IHRlc3RpbmcvYmVu Y2htYXJraW5nIHB1cnBvc2VzIGRlc2NyaWJlZCBpbiBjb21taXQgZmM0MzI0YjQ1OTdjCj4+PiAo InZpcnRpby1ibGs6IGJhc2UgcXVldWUtZGVwdGggb24gdmlydHF1ZXVlIHJpbmdzaXplIG9yIG1v ZHVsZSBwYXJhbSIpLgo+Pj4gU2luY2Ugd2UgaGF2ZSBkaWZmZXJlbnQgdmlydGlvLWJsayBkZXZp Y2VzIHdoaWNoIGhhdmUgZGlmZmVyZW50Cj4+PiBjYXBhYmlsaXRpZXMsIGl0IHJlcXVpcmVzIHRo YXQgd2Ugc3VwcG9ydCBwZXItZGV2aWNlIHF1ZXVlIGRlcHRoIGluc3RlYWQKPj4+IG9mIHBlci1t b2R1bGUuIFNvIGRlZmF1bHRseSB1c2UgdnEgZnJlZSBlbGVtZW50cyBpZiBtb2R1bGUgcGFyYW1l dGVyCj4+PiAndmlydGJsa19xdWV1ZV9kZXB0aCcgaXMgbm90IHNldC4KPj4KPj4gSSB3b25kZXIg aWYgaXQncyBiZXR0ZXIgdG8gdXNlIHN5c2ZzIGluc3RlYWQgKG9yIHdoZXRo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