Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5309544rdb; Sat, 16 Sep 2023 11:01:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSJ8kkbQ4O5X1Furc5tWxBBbopYPYUX/7/JDPF1xGBeRnstHa2+qlUh65CBNaCFzhgW+Sz X-Received: by 2002:a17:902:e852:b0:1c4:65d5:34ce with SMTP id t18-20020a170902e85200b001c465d534cemr1311699plg.31.1694887305795; Sat, 16 Sep 2023 11:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694887305; cv=none; d=google.com; s=arc-20160816; b=cWOYqKXOu/DkvfcE0j+0QwbUyVRKTwqI/ihj6avy3NVMpNeq+0PzZsI14bnk+G+viU JR9Ohv3tTnkZl/SAyTE+csMM1opzWzWVhIl6qq+ktr9217gEneSeTjiJmI2CHE2hWezi BdkDL+3koILwsakgjkPwpxZ7durW63iIdpEbkMqfpaZTSFDMcwv+DqY8q6HsPyYlA103 uuSLITmtf4KT4k3ZtaajUbS03vImyUJOEiFtAyGpaV94KWnG7XBSRyPDjGp2Y1O1+7v3 WHc2YkTYJOI6pKbS4jkyoisAn58aYydPeHukWzg6RHt3S01sJOMOZWIX5MhtTXBc3fl7 xiSQ== 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=BGEP6R3c9Jhc+DpCgSNfDoTCVIo/fpZjOC0f7OC9AbQ=; fh=aT2HW8GKtI2sOM0lqswCpgNwQ+9YiDu1uaQwFhxga/8=; b=oj2p4hj+vHXFbXZsSFQDwY2VIA1V0ZGEfI5SOMvoeYgUVmx3cjhUZzKDmC7zkxda8x P64KF6aGejcDKRimBIW3xm3ZykL7z6UDy7k8xr0NPZYBPlcABWSbTUHVRz9sJfrl8ui7 +a0jYE2BSDAls+tQbYcRMkJDB0T+EvUlp5sGS4210we02QH823tqQ4mJ/8LcaU9zFc6r GiWTqTxKAZ4QOYw+qsbfPFfdVuHqptnH7QaqFAxkMIlY0sE4dQyvK8XEerRJxedJJmVe qUh+9OHwi6lEDii7wReVRTHzNFU308aCQKQo4LaV9LTGhydlSkX5OiA9XLj5gwwfr0Pw DC2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H+5xD+lR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ot2-20020a17090b3b4200b00274caaa057asi1076348pjb.42.2023.09.16.11.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 11:01:45 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=H+5xD+lR; 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; 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 agentk.vger.email (Postfix) with ESMTP id 4CFA98093422; Sat, 16 Sep 2023 02:25:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238883AbjIPJYu (ORCPT + 99 others); Sat, 16 Sep 2023 05:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238879AbjIPJYS (ORCPT ); Sat, 16 Sep 2023 05:24:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42F28173C for ; Sat, 16 Sep 2023 02:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694856208; 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=BGEP6R3c9Jhc+DpCgSNfDoTCVIo/fpZjOC0f7OC9AbQ=; b=H+5xD+lRWEJoEV+yMvzwk1tSjWG6XB5eqUJV99NEKDK+huGf8YTZEgGouE6S9tbu3GLQZU RaYZHSc3DDyGBpNbiC0OBB3g2uVuAQt2+LBzdtSxoieAlx2fLEIKM9khJfuumESpxGPOzx DUcKzQiQTtLM/Dw8fFe8HCCghB3UY7k= 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-683-dS3atwUAML2XJhTUgDpg-Q-1; Sat, 16 Sep 2023 05:23:23 -0400 X-MC-Unique: dS3atwUAML2XJhTUgDpg-Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 9E707945921; Sat, 16 Sep 2023 09:23:22 +0000 (UTC) Received: from fedora (unknown [10.72.120.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B14D40C6EBF; Sat, 16 Sep 2023 09:23:15 +0000 (UTC) Date: Sat, 16 Sep 2023 17:23:10 +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 , ming.lei@redhat.com 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.2 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 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]); Sat, 16 Sep 2023 02:25:22 -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. RQF_MQ_INFLIGHT is only set for BLK_MQ_F_TAG_QUEUE_SHARED, so we can avoid the extra atomic accounting for !BLK_MQ_F_TAG_QUEUE_SHARED. But now your patch switches to account unconditionally by removing RQF_MQ_INFLIGHT, not friendly for !BLK_MQ_F_TAG_QUEUE_SHARED. Thanks, Ming