Received: by 2002:a05:7412:1492:b0:e2:908c:2ebd with SMTP id s18csp232566rdh; Mon, 21 Aug 2023 13:21:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeJLuFwTT9lfs179xzErRqT5dKyWrERGDWonEgO5uhAPgvGrDF6CMbVpHXDj1iH4mSKxyl X-Received: by 2002:a05:6e02:c05:b0:349:2d61:8631 with SMTP id d5-20020a056e020c0500b003492d618631mr9946845ile.10.1692649286842; Mon, 21 Aug 2023 13:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692649286; cv=none; d=google.com; s=arc-20160816; b=UkE5ayeVVBXYafRT5gU+VV7Mv1TBIHXP+wbWawavq2ZunIy33f0OwUs6pLQ17k4b5E g4AqylzXhcxdYE/+wUE0hVCANctvEFB7zuQvp28euWa6iUd7gZhlK/pmfXelFChe1Moe +Qv+HYgFV5L6NbusMri237em+hp1WodsgI9sWAn3mGY5vE+jEnOb+zdSgCCMdz0+OKJm eaH18lknWxqvnOYosf/le//6i/Ll0aq+eH+lBcvTYwt1nf+XQ2JEaqP3F0Q3kaEEKq+f l9Q6HaxutoXNoQPjqTE8xFQWZod5sXLwcBc92aHmrvKA7lPo53DcGoKg5duHh32N+5h3 cGPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=QwaB1aNpCSPTQqMR1zA27jiuAOxFmRQuBCIOZpDrf6U=; fh=U3MLEJzjE1UmRdbWeqVOqKsxF1mrgFFS6KSke/IzGsU=; b=wEeXcx32yfLelvGzelxXo9YOWlK2Ps/2RrTM8+pveJYDypXg/rLYzZ9+dfWJ5P2E32 vTilHYKcP+3IwmsL3e44eLL0Svz1Bh2v+77/QXKf+ouBLbAhdKrJGV5Jprz4qcyBVZG9 HePyDzBFvVLQdDyF03lcXklxpbzmQw5rBWcDP5qK3kp1s6I7Gor6Ji84Bw4rD7kI6CMk kRFruwkK3CLigApTmmEGGni6CkHbMyFQS4OsFC29gtj56eCDHVe0j/3gEeU9wPjBMQFb isMmN2M0gNWQfwlQ+knKkKBdbodwv1XiR28Na3YvjTFJfZw3UvLYJT+o14J8TrAu19qe 8gXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv65-20020a632e44000000b0056a6ea68141si4766373pgb.59.2023.08.21.13.21.14; Mon, 21 Aug 2023 13:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbjHUT7J (ORCPT + 99 others); Mon, 21 Aug 2023 15:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbjHUT7J (ORCPT ); Mon, 21 Aug 2023 15:59:09 -0400 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CBD918F; Mon, 21 Aug 2023 12:58:59 -0700 (PDT) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-56c2e882416so792050a12.3; Mon, 21 Aug 2023 12:58:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692647938; x=1693252738; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QwaB1aNpCSPTQqMR1zA27jiuAOxFmRQuBCIOZpDrf6U=; b=C9PC9IlQ8L00iZZVk8yDFzTFZfuDrnTGij/ydLP4TFs+MqBJU4MdJgIxkcVZu6lQmw U+oAKc+p+0Z7hu9kN8Ndd3per21VNDZZYOUX/EPyPfG/X5KQedbJUOFyEPOHnuweOlIR 8gY1rzaOLpKkxDOBYGaK7tFBLFxLCE11BiXc+X5ebtEGIhjd2w+MsMVcTKYC8LbU/enb hwgbF8JPMFsxf435Bi7v9YJgtIQKGUrdTWGZEScJ1ZDCwvmI4X9MrUnAl8CSQjWt97aW HfqhZlDeMeX/4kipaX4OU45f8HonlsC1XW5tvTpx01ls/I+wrBBmnBxkxoHrho5g2FPv XTsA== X-Gm-Message-State: AOJu0YzfODv0GY8hsBc/QK7dZJR2H9np3pCogAfXVJoepokKQESbTZqF xUqZ0U094eaZxhR/FnPC05BTmoKhMaM= X-Received: by 2002:a05:6a20:96d0:b0:133:b3a9:90d with SMTP id hq16-20020a056a2096d000b00133b3a9090dmr4740638pzc.36.1692647938403; Mon, 21 Aug 2023 12:58:58 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:ef58:6534:ec7a:8ab2? ([2620:15c:211:201:ef58:6534:ec7a:8ab2]) by smtp.gmail.com with ESMTPSA id bm17-20020a056a00321100b00686ed095681sm6523618pfb.191.2023.08.21.12.58.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Aug 2023 12:58:57 -0700 (PDT) Message-ID: Date: Mon, 21 Aug 2023 12:58:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH 1/4] blk-mq-tag: support queue filter in bt_tags_iter() Content-Language: en-US To: chengming.zhou@linux.dev, axboe@kernel.dk, ming.lei@redhat.com, hch@lst.de Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com References: <20230821073528.3469210-1-chengming.zhou@linux.dev> <20230821073528.3469210-2-chengming.zhou@linux.dev> From: Bart Van Assche In-Reply-To: <20230821073528.3469210-2-chengming.zhou@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/21/23 00:35, chengming.zhou@linux.dev wrote: > @@ -417,7 +425,23 @@ static void __blk_mq_all_tag_iter(struct blk_mq_tags *tags, > void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn, > void *priv) > { > - __blk_mq_all_tag_iter(tags, fn, priv, BT_TAG_ITER_STATIC_RQS); > + __blk_mq_all_tag_iter(tags, fn, priv, BT_TAG_ITER_STATIC_RQS, NULL); > +} > + > +static void __blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset, > + busy_tag_iter_fn *fn, void *priv, > + struct request_queue *q) > +{ > + unsigned int flags = tagset->flags; > + int i, nr_tags; > + > + nr_tags = blk_mq_is_shared_tags(flags) ? 1 : tagset->nr_hw_queues; > + > + for (i = 0; i < nr_tags; i++) { > + if (tagset->tags && tagset->tags[i]) > + __blk_mq_all_tag_iter(tagset->tags[i], fn, priv, > + BT_TAG_ITER_STARTED, q); > + } > } > > /** > @@ -436,16 +460,7 @@ void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn, > void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset, > busy_tag_iter_fn *fn, void *priv) > { > - unsigned int flags = tagset->flags; > - int i, nr_tags; > - > - nr_tags = blk_mq_is_shared_tags(flags) ? 1 : tagset->nr_hw_queues; > - > - for (i = 0; i < nr_tags; i++) { > - if (tagset->tags && tagset->tags[i]) > - __blk_mq_all_tag_iter(tagset->tags[i], fn, priv, > - BT_TAG_ITER_STARTED); > - } > + __blk_mq_tagset_busy_iter(tagset, fn, priv, NULL); > } > EXPORT_SYMBOL(blk_mq_tagset_busy_iter); One change per patch please. I think the introduction of __blk_mq_tagset_busy_iter() should be a separate patch instead of happening in this patch. Thanks, Bart.