Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp618182img; Mon, 18 Mar 2019 10:21:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVK4JYAbkcQNezrO2EQrueerFA64BJDKckEC/zPKwM6OMkRYr1BLF7XNnxKQ+jTAQr0q2W X-Received: by 2002:a65:4581:: with SMTP id o1mr18807109pgq.159.1552929715135; Mon, 18 Mar 2019 10:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552929715; cv=none; d=google.com; s=arc-20160816; b=q8QDeYID2xIzTkocjrG3E9EfJHW/auowl+Bx4IaxO/y6xBAx+3gXPM1ddJVMfqFs2q STMZ5vVOCf3URgjJaPDDO8V3DEXNDoxVz10UoBmR2GPBr9d1RdTugdIbz6QTgtwaa/wU gjXLaW5JqURPK72coXFwtziPHggO4dHcxF4Du+t8XY9c7TmF2b8ZvlwELt0XOI+xLLIf H3aa4Fa6+M+IPHzckzhsu3Juv15b9p6luFKaLmk0vCEQVYUKe14iy81RUTBj3yx3gBi/ /eIKo+F0rf8J4EoJaq7pcMnccqu3h8A9amHfjQ/xVd3wAO8+gLg4Gw6Y9GdfpcLfrRiP tvOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=NbHAd3+VvwXsq8BBp+6aJ+dj6lwQXqlV8Q8gIb5K+Oc=; b=uiHyK6Unbz2nG/1/ndakiWtmoSts7OKfKJo/IPIxAQuFva2x/OhHKXj1Fx6IqVbrcT gXGATSAkMx1z08qk60A+Wnt2wbfUacrI1J9TSfVqIWEkuRuirMmU+7rvPzgYg7vgdl0d V/cGDZ5KhKIGWH3HZhYYE0stjag2GFvWpP89Tj4f9cn2h/neXTGpxJpVZ06GoL+m6wp1 YtZ4TD53X5JWF60CmTykK29Eahyu8tZgwKlQxanOYsquvCnJH7rGZt2REu6Vkx3p3nTs Pijj3in2q5sRBuWm3MR/qUwdV+DYalpts91m0FUTaACajfYRAjWQbK/puh5LdzN6IhZl /tdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si9594835plr.54.2019.03.18.10.21.40; Mon, 18 Mar 2019 10:21:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbfCRRUi (ORCPT + 99 others); Mon, 18 Mar 2019 13:20:38 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39396 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfCRRUi (ORCPT ); Mon, 18 Mar 2019 13:20:38 -0400 Received: by mail-pf1-f194.google.com with SMTP id i17so1939273pfo.6; Mon, 18 Mar 2019 10:20:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=NbHAd3+VvwXsq8BBp+6aJ+dj6lwQXqlV8Q8gIb5K+Oc=; b=SkMk4A7k5tISUEmGqVZEeVlWHSDo/iiOSRMrS2zrIAW8WHTXi/mx4JxYVC48u2Ng71 kbcyrnu+GnTVJHw3/YosfTfZ42k7xR80wY214hKNoTRC2xZO/UB8fOe8wW0xl6+4QyEP 2hTMsK4yBSJL8bdwuBcj9t3qmtyEPjMiByVeeAzP3Dl6QvGnSEHaqOJHtqZPZQC/oQDo 4tfA05CjZKPN4nO0b8HViXAnbjfEtIB3mZ8hfA+8XZz0w0vznz8wqO75du2qCLvzwDAl p7N5BgFxtYteKyeQyqU2LXMmjf4VBz8iJpQLiMmWclxSuBrjM1eE4KSw/lAiGgF1Jux9 q7WQ== X-Gm-Message-State: APjAAAWQahCG/GVGrCFTeeWoKSrya3+vAibQCTp9wM2hLNIiHmUdU5zY HFwsNeoIison/DpDqbK7syixAW4XAUo= X-Received: by 2002:a17:902:2989:: with SMTP id h9mr21061927plb.26.1552929637160; Mon, 18 Mar 2019 10:20:37 -0700 (PDT) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id w2sm12964184pgp.81.2019.03.18.10.20.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 10:20:36 -0700 (PDT) Message-ID: <1552929635.152266.30.camel@acm.org> Subject: Re: [PATCH 6/8] skd: use blk_mq_queue_tag_busy_iter From: Bart Van Assche To: Jianchao Wang , axboe@kernel.dk Cc: hch@lst.de, jthumshirn@suse.de, hare@suse.de, josef@toxicpanda.com, sagi@grimberg.me, keith.busch@intel.com, jsmart2021@gmail.com, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 18 Mar 2019 10:20:35 -0700 In-Reply-To: <1552640264-26101-7-git-send-email-jianchao.w.wang@oracle.com> References: <1552640264-26101-1-git-send-email-jianchao.w.wang@oracle.com> <1552640264-26101-7-git-send-email-jianchao.w.wang@oracle.com> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-03-15 at 16:57 +-0800, Jianchao Wang wrote: +AD4 blk+AF8-mq+AF8-tagset+AF8-busy+AF8-iter is not safe that it could get stale request +AD4 in tags-+AD4-rqs+AFsAXQ. Use blk+AF8-mq+AF8-queue+AF8-tag+AF8-busy+AF8-iter here. +AD4 +AD4 Signed-off-by: Jianchao Wang +ADw-jianchao.w.wang+AEA-oracle.com+AD4 +AD4 --- +AD4 drivers/block/skd+AF8-main.c +AHw 4 ++1filechanged2insertions(), 2 deletions(-) +AD4 +AD4 diff --git a/drivers/block/skd+AF8-main.c b/drivers/block/skd+AF8-main.c +AD4 index ab893a7..60c34ff 100644 +AD4 --- a/drivers/block/skd+AF8-main.c +AD4 diff --git a/drivers/block/skd+AF8-main.c b/drivers/block/skd+AF8-main.c +AD4 index ab893a7..60c34ff 100644 +AD4 --- a/drivers/block/skd+AF8-main.c +AD4 +-+-+- b/drivers/block/skd+AF8-main.c +AD4 +AEAAQA -395,7 +-395,7 +AEAAQA static int skd+AF8-in+AF8-flight(struct skd+AF8-device +ACo-skdev) +AD4 +AHs +AD4 int count +AD0 0+ADs +AD4 +AD4 - blk+AF8-mq+AF8-tagset+AF8-busy+AF8-iter(+ACY-skdev-+AD4-tag+AF8-set, skd+AF8-inc+AF8-in+AF8-flight, +ACY-count)+ADs +AD4 +- blk+AF8-mq+AF8-queue+AF8-tag+AF8-busy+AF8-iter(skdev-+AD4-queue, skd+AF8-inc+AF8-in+AF8-flight, +ACY-count, true)+ADs +AD4 +AD4 return count+ADs +AD4 +AH0 Hi Jianchao, If you have a look at the skd+AF8-in+AF8-flight() callers you will see that the above change is not necessary. +AD4 +AEAAQA -1916,7 +-1916,7 +AEAAQA static bool skd+AF8-recover+AF8-request(struct request +ACo-req, void +ACo-data, bool reserved) +AD4 +AD4 static void skd+AF8-recover+AF8-requests(struct skd+AF8-device +ACo-skdev) +AD4 +AHs +AD4 - blk+AF8-mq+AF8-tagset+AF8-busy+AF8-iter(+ACY-skdev-+AD4-tag+AF8-set, skd+AF8-recover+AF8-request, skdev)+ADs +AD4 +- blk+AF8-mq+AF8-queue+AF8-tag+AF8-busy+AF8-iter(skdev-+AD4-queue, skd+AF8-recover+AF8-request, skdev, true)+ADs +AD4 +AH0 Same comment here. If you have a look at the callers of this function you will see that this change is not necessary. Thanks, Bart.