Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1465074rdb; Wed, 6 Dec 2023 22:39:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpoasbjc/Cgg3rxLHI1DoHes4AnfeKAyEB7guFCqDg0E/WjdE06chdvcbOR8yqyM2N3V0y X-Received: by 2002:a17:90a:d709:b0:286:6cd8:ef0e with SMTP id y9-20020a17090ad70900b002866cd8ef0emr5443946pju.38.1701931143677; Wed, 06 Dec 2023 22:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701931143; cv=none; d=google.com; s=arc-20160816; b=DHsrjqmPdTGojjYZCFU5ZprSKhE5KxfBte3PfhO0u4lcHTy2egzE1gnfxThHASV07T 7TGixJYc8oVg24rr3y+m+9Isjg+eIdSChtZn+/zf9HkrSl6SKQcuz4e5PCpwubw5AB4t o/+aD0ZDjrlFRIg8Of4lEFQXkpDreeZ3zCPg6j0k1Q2mcrMfIoJMVmD5GAvqqP4zYFA0 lCbt5cw1CJQX+mdUY97zwSG7SKjl/LNtKy+yALNuImDmLpdkFFSLywePP5TYfRjQmaal +XfVorCYvA4klOlBloNXrAucDkuCIrWyRSzkUbPq00hhwderQXLeaD4WyS513MEgUFwd kRFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zWU3XhY3SGz8Nm4Q405d0erGPeXKkfHuFXSX394aJLk=; fh=EYfg9ruxrTI05Lf+6uv6o0vXPjSJnqdN5wLjK2hxyQM=; b=BsB8Nc3xHjwDJaMAEGJxtFtQbHWi+kMjIA28+ChTGJ+zQET2mR9j5Hw6/IceifqDJh tC6WSSrw2XucRoxNCdLjMIA9iblmKCcTgBIVXZtlq8dOTFsJmOIJCECVEdTSbhp1ghZL P8IfW5y080nv+D9zsJNpOQZGZsTF9jzvCaps9ylXBTsywnFKdKOf14VcXdxEklOtq/UG pZ0vsl0wXtJyIJD+sYa5dAzSxrpqiMKbeoeXSYvm7bXjceuCmTS4nXlFv+3C1rqdMV49 tg8sdzRqRVKZW9AfphqywakWAw4yrye5Xr+SvJFM5yYlkKSH95PhhIJseJ/P2Vdj3Rer y/Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F8SpE+xT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o5-20020a17090ac70500b0028686137ba6si510598pjt.90.2023.12.06.22.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 22:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F8SpE+xT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1DC8D82CEFE6; Wed, 6 Dec 2023 22:39:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbjLGGij (ORCPT + 99 others); Thu, 7 Dec 2023 01:38:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjLGGii (ORCPT ); Thu, 7 Dec 2023 01:38:38 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 126CDD59 for ; Wed, 6 Dec 2023 22:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701931124; 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=zWU3XhY3SGz8Nm4Q405d0erGPeXKkfHuFXSX394aJLk=; b=F8SpE+xTqNcOxnosIq2kwiHdPxTGD1nykvYX5r11gyU17crEKzI2QI07h0hPo8xtDY4duV L7oOYwh6Uw2oKRJWpEvRx62S/4qc78d2dKfLlGX8SSw053Erv9acqfOgCSrJ5qJmfvKYaT /NVlbHVBnMbNWoBQ4tQYbvCmtIy7VEY= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-493-lgdW7a0BM-62ywO_z42CsA-1; Thu, 07 Dec 2023 01:38:42 -0500 X-MC-Unique: lgdW7a0BM-62ywO_z42CsA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a1eb3f3dc2eso17893066b.2 for ; Wed, 06 Dec 2023 22:38:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701931121; x=1702535921; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zWU3XhY3SGz8Nm4Q405d0erGPeXKkfHuFXSX394aJLk=; b=eGkgS4ixpR85IU5A5lvvgeiX0+2o7OO7ih9YAGRPssIzA6OR3Ded1O4rEb8CmeT7GC xn/eMhO8oVE4PRKhIv8b74YelKnm9+0fkUzStAv7xv5UbXEs/fxaa2a7Ul+Z8mvTKTO/ sgzhTSR4KfMQXF1SEq5CYFk1GeD+nXzQLwui8UN8g2Bjl3g6C0tLIUYP88ymSsfaV9eT bBzl2S8+FMQwSpqLcz8oZiUHrvI61KkFedRbFfg/Acv5r7mNYjPniUQUcoUfUuKDF2Kj A4NbVV4exyn0RXnBL4UZOZFrH5Hn90H7AmGtwro4uObz32cA2hzSHzEzz1kPtFY6ETsi BBcQ== X-Gm-Message-State: AOJu0YxSwARJKYlNf12u24pxo4W8HtwkND5wfLuZGxKYhr16JemfB+J+ PGZbbzk2ZvDf3K1iaNuLvx38r/U8JmY76FAcDzBd+pDwvBzQaV4mBwR/rP48x9fe91TfND7eVkx Yfg7oziVRiD3ttd7wqEArwnz6 X-Received: by 2002:a17:906:412:b0:a19:a1ba:8cdf with SMTP id d18-20020a170906041200b00a19a1ba8cdfmr1283535eja.125.1701931121431; Wed, 06 Dec 2023 22:38:41 -0800 (PST) X-Received: by 2002:a17:906:412:b0:a19:a1ba:8cdf with SMTP id d18-20020a170906041200b00a19a1ba8cdfmr1283523eja.125.1701931121146; Wed, 06 Dec 2023 22:38:41 -0800 (PST) Received: from redhat.com ([2.55.11.67]) by smtp.gmail.com with ESMTPSA id s6-20020a170906c30600b00a1dee0289b4sm376148ejz.169.2023.12.06.22.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 22:38:40 -0800 (PST) Date: Thu, 7 Dec 2023 01:38:37 -0500 From: "Michael S. Tsirkin" To: Jason Wang Cc: Li Feng , Jens Axboe , Paolo Bonzini , Stefan Hajnoczi , Xuan Zhuo , "open list:BLOCK LAYER" , open list , "open list:VIRTIO BLOCK AND SCSI DRIVERS" Subject: Re: [PATCH] virtio_blk: set the default scheduler to none Message-ID: <20231207013617-mutt-send-email-mst@kernel.org> References: <20231207043118.118158-1-fengli@smartx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 22:39:01 -0800 (PST) On Thu, Dec 07, 2023 at 02:02:36PM +0800, Jason Wang wrote: > On Thu, Dec 7, 2023 at 12:33 PM Li Feng wrote: > > > > virtio-blk is generally used in cloud computing scenarios, where the > > performance of virtual disks is very important. The mq-deadline scheduler > > has a big performance drop compared to none with single queue. > > At least you can choose the scheduler based on if mq is supported or not? > > Thanks This is already the case: static struct elevator_type *elevator_get_default(struct request_queue *q) { if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT) return NULL; if (q->nr_hw_queues != 1 && !blk_mq_is_shared_tags(q->tag_set->flags)) return NULL; return elevator_find_get(q, "mq-deadline"); } I guess I agree blk is typically kind of similar to loopback so none by default makes sense here same as for loopback. Stefan care to comment? -- MST