Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1425794rdb; Wed, 6 Dec 2023 20:33:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHj9iW45j7ICYeX/f1g5U0QcoNy5ZHa2iSC6nOpzfhJi0DrGtozhxSIjFI1A3MAdzL4VZNi X-Received: by 2002:a05:6808:4492:b0:3b8:b063:6bc0 with SMTP id eq18-20020a056808449200b003b8b0636bc0mr2342958oib.111.1701923595860; Wed, 06 Dec 2023 20:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701923595; cv=none; d=google.com; s=arc-20160816; b=Uxq34L22ajSdleMUMJjZ5MRwDcpCgtii5a5PaTfQ1HHaH+1dG5B70C7tT4a8G/n2rX R7cu329UNNjwAQTxnYg0021CSslvxawa8AMMI2Ly6EZo+nctA1AtNZuvOHNQLlVca1bo Elbl+XavN31fOv+5lmEm+afIOuutjbXAobESPz9hd1gt9YpY0RVUuJGAQznsOOzzPSGk tbOeGOukPrvu0p2+CSklD3wjtsPGksno9/HDMfxjRnBJ+VYzQyBqyqoFg3hR1OVYmMj0 AYU0214YP2IxsI9Ol7Gr2qZfw3MDPGxUk5dqcscs/MHzZfeuHRtYFgc8AnC4c5ijpNXy +Ryw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=f/Lf0+IIfQE0io2nHdmDYhVLqD8zUaOijlO0hMGWTXo=; fh=KLbKAGsYD3VBNrqJEwWvwvgBwZIdQqVm8mVCmSEfeK4=; b=HwRr38y1W4c06r6Vn+LLXx+TX0+BOOySHU0TwjMbbEjwzwSNzgp8I2W5C/kCLv8hpm ugS9BlPSVx2ilmVhrc4iAewictvhcrU0/lQRI5qgMEsBIkGttZVYZGsnmPBneyWgxTJt 9rhW3nbxtzItzQDXx+LCfeJfRanpOW21JMHGVMHpuxuUkNkSDhcXgGXkCQVr/dItgfu/ CbpSGkwjIJrN0AWqK42Oq839V0dd7kECffgjTLvUkukckXiVAUdgDD2zedx1eCHiNATh aSWtEEc+RjApqmeSkW/LgdLiu34fzVO1awCsF0lpn8fOB7J6qf1jjnVpyorQ7Xx7uDyy d/Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@smartx-com.20230601.gappssmtp.com header.s=20230601 header.b=wT5VYrmQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ch6-20020a056a0208c600b005c6818b5a28si481001pgb.517.2023.12.06.20.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 20:33:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@smartx-com.20230601.gappssmtp.com header.s=20230601 header.b=wT5VYrmQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5B8688023EDB; Wed, 6 Dec 2023 20:33:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjLGEc7 (ORCPT + 99 others); Wed, 6 Dec 2023 23:32:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjLGEc5 (ORCPT ); Wed, 6 Dec 2023 23:32:57 -0500 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01BBCD54 for ; Wed, 6 Dec 2023 20:33:03 -0800 (PST) Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3b844357f7cso439747b6e.1 for ; Wed, 06 Dec 2023 20:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1701923582; x=1702528382; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f/Lf0+IIfQE0io2nHdmDYhVLqD8zUaOijlO0hMGWTXo=; b=wT5VYrmQHNPb1qQ3+Ylr9AB94gfVkmZCFtEREN9DtQks6bAY4XrND3mEdttHR1wUFc iTMAjQlS3o3LvUrt8m1x0G1eUlxaF3TpDvc1sl6Iqnv8z3Q+K/pRmBXMRfRo4+yDjRGl ghcAxp3IzknCeqJbtDbB2MlB1RyGOM2LDvqOqWYvjd5uHkHxjkfAHdLuYfLhb8hWdMS5 MTaSlG6GHaZbIC04MgNmA1u1mJJSYnxM0tRpJ+3m8orCYnGracbeMtYooR1sH/1hbjEg at7BC0WM+rm9qm5t8GXilCu/mYYtKbpy7L6s3BCL1IFgBtZvYBRa7wovb16RpUfuvPUR ELPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701923582; x=1702528382; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f/Lf0+IIfQE0io2nHdmDYhVLqD8zUaOijlO0hMGWTXo=; b=g9ac2S121q0/w9tZ02bvzRDjuynuYrXBnnODCi4bpXbTinSEuXm40uenoz6jmIldFU 8AIj6T5w+35TT/0tDAzoDyaC0PyfcNXGIqjWONuMkRobgcdNgSxG2NPT+IbxSWkgBD3v XmKO+u5A7XnGVwj9l2OfDqferxHgbM2eJ/L01Y4JXUJ3sKt0fZzEY7R28QUEY5BCB7mH r0xsLXvt+0WrAazfJhPSMBGSpVW70/ts8br9zPueIXsIf+iYUxeJaIG6oI7uC+INh+FS WKVPsgdkHh94zyr3UPhrw3WxaciN4HFXRYq2ztnr7Vc/BXkBYbpU7EXpRY9/cBm4eniS 6uaQ== X-Gm-Message-State: AOJu0YwBq18fq/C2I2v+vqK2sztWge3g3zMeVNnd+F2Wtf772C15If0A KxVraIufMR9ABPcxoNnoayet6w== X-Received: by 2002:aca:1b02:0:b0:3b9:dcf0:63b9 with SMTP id b2-20020aca1b02000000b003b9dcf063b9mr615047oib.23.1701923581661; Wed, 06 Dec 2023 20:33:01 -0800 (PST) Received: from localhost.localdomain.localdomain ([8.210.91.195]) by smtp.gmail.com with ESMTPSA id v19-20020aa78513000000b006cea1e12564sm332971pfn.81.2023.12.06.20.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 20:33:01 -0800 (PST) From: Li Feng To: Jens Axboe , "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Xuan Zhuo , linux-block@vger.kernel.org (open list:BLOCK LAYER), linux-kernel@vger.kernel.org (open list), virtualization@lists.linux.dev (open list:VIRTIO BLOCK AND SCSI DRIVERS) Cc: Li Feng Subject: [PATCH] virtio_blk: set the default scheduler to none Date: Thu, 7 Dec 2023 12:31:05 +0800 Message-ID: <20231207043118.118158-1-fengli@smartx.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 20:33:13 -0800 (PST) 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. In my tests, mq-deadline 4k readread iops were 270k compared to 450k for none. So here the default scheduler of virtio-blk is set to "none". Signed-off-by: Li Feng --- drivers/block/virtio_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index d53d6aa8ee69..5183ec8e00be 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -1367,7 +1367,7 @@ static int virtblk_probe(struct virtio_device *vdev) vblk->tag_set.ops = &virtio_mq_ops; vblk->tag_set.queue_depth = queue_depth; vblk->tag_set.numa_node = NUMA_NO_NODE; - vblk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; + vblk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_NO_SCHED_BY_DEFAULT; vblk->tag_set.cmd_size = sizeof(struct virtblk_req) + sizeof(struct scatterlist) * VIRTIO_BLK_INLINE_SG_CNT; -- 2.42.0