Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5162457rdb; Sat, 16 Sep 2023 05:42:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGckD8W2K5nUm0l0UhgJO0cNe2sTyZDItnGcyTlW55au/yZUvLNid0Ag4EaicibK+ZntLZ0 X-Received: by 2002:a17:902:6806:b0:1b3:d4ae:7e21 with SMTP id h6-20020a170902680600b001b3d4ae7e21mr4252573plk.63.1694868128848; Sat, 16 Sep 2023 05:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694868128; cv=none; d=google.com; s=arc-20160816; b=SyhZCF3WOtQol0iry27Lon6q1ep7zBChPDoMyAfehJ2+6Q8Qv2BTY/MGrFU7QgY4tm R7wCrBj29PNlzfvX2KdiZ6G6IumP2ovlMXY77p/zNTRu2sL9uL9Zs+kP+I7EgQHq9lJD 8WYvUjFUkHEDMKKdozxPSVciHEMWBN6OzXVPWU2GnvBRfSA+xEok9JCTWab3h44z63vj itwSruS9d9Z2IiEd/WFruK6sqs0tmq1CueBD9z0jDcH7jBjyqK2iV0Bf1JkLekcHVO/p Kvlqu/vnF38k+Hp+QRT5Uzu7Zd5OL6JEcO68nEp0YAcYhkKb2P16Ro/IpS5BY5xKidYQ 4nfw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vRi9ZR5pdwGT1p3xgTqgA4/cyNJb7odKKn0k0Q7KZbg=; fh=osRuhd8ymWapU0IYvZgvh/1X4iBtq6oxDgJSeRwvD6Y=; b=AgEkWYw+EkB39u1Guw9eXKXsgHg81J4PUMfNaDGNaTeBTf8XCHBdIzyzJiuEDF2/8b 5hkt+STafFd5aztbv45Zu9l7gCcwjweN9WxpYuhQi+l9t4j4JRA4kXyRCbQ1Pu6lL38R sgeurZu5KcB1Z4sqmzGlBMhr5rd5U0Dly2a92x0cOBTKDrIY49BK43LzxDZRnwKff6u2 nuLX+Q2fNbicnIrXZtglxvScP2ONlkwamBl4trR6AZfHMIm5L44eYywP22wlSAvZPwy+ 4oMM+cukD6fynTzwWaGPU7cWSvyLYU5KTwg5vj+NUbwoaFHicKOimdA9ikrXJYKqpEBJ IbTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fTMAQ9xM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s15-20020a170902ea0f00b001bc674914b0si5121705plg.472.2023.09.16.05.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 05:42:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fTMAQ9xM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 6B7688348269; Sat, 16 Sep 2023 05:41:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239181AbjIPMkx (ORCPT + 99 others); Sat, 16 Sep 2023 08:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239402AbjIPMkr (ORCPT ); Sat, 16 Sep 2023 08:40:47 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 32A89E42 for ; Sat, 16 Sep 2023 05:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694867989; 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: in-reply-to:in-reply-to:references:references; bh=vRi9ZR5pdwGT1p3xgTqgA4/cyNJb7odKKn0k0Q7KZbg=; b=fTMAQ9xM6tteGQ2VGrS3U3KpL37GlSJn/Xv3vcyRAHGOW3sow9o+8sg91QkGilY2pMCNJh YADKH2iZQ2Z4xF7MoKvGBYBBn/7YBtvKEqSJiZIkaBy0k8YtmyKjlboWYK/E2P+OFc+82N Bir1jLgXaAXRn0TAqlG7qoiGhkaMucM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-90-gM2Hse8-MhSM2oehvMvRRg-1; Sat, 16 Sep 2023 08:39:45 -0400 X-MC-Unique: gM2Hse8-MhSM2oehvMvRRg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A5E4018175A0; Sat, 16 Sep 2023 12:39:44 +0000 (UTC) Received: from fedora (unknown [10.72.120.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5533A10005D3; Sat, 16 Sep 2023 12:39:38 +0000 (UTC) Date: Sat, 16 Sep 2023 20:39:34 +0800 From: Ming Lei To: chengming.zhou@linux.dev Cc: axboe@kernel.dk, hch@lst.de, bvanassche@acm.org, kbusch@kernel.org, mst@redhat.com, damien.lemoal@opensource.wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: Re: [PATCH v2 1/5] blk-mq: account active requests when get driver tag Message-ID: References: <20230913151616.3164338-1-chengming.zhou@linux.dev> <20230913151616.3164338-2-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913151616.3164338-2-chengming.zhou@linux.dev> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 16 Sep 2023 05:41:23 -0700 (PDT) On Wed, Sep 13, 2023 at 03:16:12PM +0000, chengming.zhou@linux.dev wrote: > From: Chengming Zhou > > There is a limit that batched queue_rqs() can't work on shared tags > queue, since the account of active requests can't be done there. > > Now we account the active requests only in blk_mq_get_driver_tag(), > which is not the time we get driver tag actually (with none elevator). > > To support batched queue_rqs() on shared tags queue, we move the > account of active requests to where we get the driver tag: > > 1. none elevator: blk_mq_get_tags() and blk_mq_get_tag() > 2. other elevator: __blk_mq_alloc_driver_tag() > > This is clearer and match with the unaccount side, which just happen > when we put the driver tag. > > The other good point is that we don't need RQF_MQ_INFLIGHT trick > anymore, which used to avoid double account of flush request. > Now we only account when actually get the driver tag, so all is good. > We will remove RQF_MQ_INFLIGHT in the next patch. > > Signed-off-by: Chengming Zhou > --- Nice cleanup, Reviewed-by: Ming Lei Thanks, Ming