From patchwork Wed Feb 1 13:41:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13124307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07A09C636D3 for ; Wed, 1 Feb 2023 13:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232415AbjBANmN (ORCPT ); Wed, 1 Feb 2023 08:42:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbjBANmJ (ORCPT ); Wed, 1 Feb 2023 08:42:09 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 389924DBC2; Wed, 1 Feb 2023 05:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=//9XVBmwitzpx1zfUZBw7kGuOnkJqlI6wOiJGG7ywCA=; b=qOs1Rxkk06oUvugIpXW2xpcEQE C2v9rFBDkUIg02Hx7CBEGyZJuT3G/EPKVEvuIZEyQxTnolxyyWj+9DpV4wRE6vKaWPzjGEYxYqDIv HWYqQ6w2p4zNEbTNSKeM+9dLIviKcasY0TPmJqXHNm0NTFGzmh3Gi24PKlzWs2wdSNSbeKotuaE9z Jo9/l2MbRIX0B/9dZ7zolcHGg5RVUo3QMe6R87RifKO8Zln+PNGoKPBVt7WgVO9aiUW5h2q6tlFhP jct/4PPwJVLaIhz9tNSkXlofQnvr4tRDGGRQnWYeuQ+VLmqGuM9rjmpryPPwd2MX0qVQkGFN6wuEh hFx5wADw==; Received: from [2001:4bb8:19a:272a:3635:31c6:c223:d428] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNDN7-00C7Xv-08; Wed, 01 Feb 2023 13:41:57 +0000 From: Christoph Hellwig To: Jens Axboe , Tejun Heo , Josef Bacik Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org, Andreas Herrmann Subject: [PATCH 11/19] blk-wbt: open code wbt_queue_depth_changed in wbt_init Date: Wed, 1 Feb 2023 14:41:15 +0100 Message-Id: <20230201134123.2656505-12-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230201134123.2656505-1-hch@lst.de> References: <20230201134123.2656505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org wbt_queue_depth_changed just updates a field and calls another function. Open code it in wbt_init, so that the local queue variable can be used instead of the one stored in the rq_qos. This will allow delaying that rq_qos->queue assignment in a subsequent patch. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann --- block/blk-wbt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 58f41a98fda911..119a43671089ea 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -941,8 +941,8 @@ int wbt_init(struct gendisk *disk) rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags); rwb->rq_depth.default_depth = RWB_DEF_DEPTH; rwb->min_lat_nsec = wbt_default_latency_nsec(q); - - wbt_queue_depth_changed(&rwb->rqos); + rwb->rq_depth.queue_depth = blk_queue_depth(q); + wbt_update_limits(rwb); /* * Assign rwb and add the stats callback.