Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4772268img; Tue, 26 Mar 2019 16:57:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkvNwwmWjEug/OM9rQPKFgeXWFYTG+h1vVQtdAbAGyr8y8txxGbClk3gxQcbMKxtZ2mfNZ X-Received: by 2002:a17:902:2c83:: with SMTP id n3mr34865549plb.281.1553644658292; Tue, 26 Mar 2019 16:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553644658; cv=none; d=google.com; s=arc-20160816; b=n8jOFrtrKHXi9bQKSju2NJ9qg5eIZrI9O3vu0yXuuu4PZOvppj6EzJnEgzLaUlaIA1 HmSMUNMNn9wy5gDBoSUh1liungnb8nmdpOkTgHvrf2PTaB2Jn2v97XrWIJUElZ2zL8lI 1TwPfSIYeQvthXpbboqFawzy2UeOeLKYNnxWGExHfQ0UZtSEeZNCqPWgkqXBioPc86oW Uda8YAh8hzOh48kH0YupCZh+EaUhi8+Y8VrRlQ5F0IUryDBat6HhD90qfDbRat/7hloF FMfmT5WKesO1WXsV2C+i7GNa9H4FGK2DJeLeesKYl7WSpRRtjBEex8jnVl6h/7V5TEnk lpjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RdBpmhL6QK5T5IPa7fV3+gg8fJyPpvuMskJza9IoXyg=; b=d6rsn+44D4aMJTeX5Zwn6YoL0Cg4TVGlFD6x9bME4z3mX9Mpa22CvhouJ5a7kTGX18 8BzKdOYo5RCLYVO3S1HIsDEkJcqdPZBmaa1AhwNpbwF+D1rtiOfvdJhX0wPu2eIpa74W c4iJuJhiKaCX6JguVpwVljP+koU1Mw3olNW9KqMl+waUoP/ZAh84bIbAqp8sGviYNJtp 2pIBgd99m9uRMuYIPu1B97sWFHfBlbv6SsRo9zojP7Le3Wr0E2m10/G5eS3qqD+GX9aK iy5n28DZc5lY9VaW6tUeEECW5xs9NBNZC7THhzm2+iPkiwxqXFYo9yQSZlt8tz4rul6r u3wQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si17943321plr.55.2019.03.26.16.57.23; Tue, 26 Mar 2019 16:57:38 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732733AbfCZX4S (ORCPT + 99 others); Tue, 26 Mar 2019 19:56:18 -0400 Received: from mga06.intel.com ([134.134.136.31]:29770 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731666AbfCZX4S (ORCPT ); Tue, 26 Mar 2019 19:56:18 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 16:56:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,274,1549958400"; d="scan'208";a="137533192" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga003.jf.intel.com with ESMTP; 26 Mar 2019 16:56:16 -0700 Date: Tue, 26 Mar 2019 17:57:27 -0600 From: Keith Busch To: "jianchao.wang" Cc: Ming Lei , Jens Axboe , "Busch, Keith" , James Smart , Bart Van Assche , Josef Bacik , linux-nvme , Linux Kernel Mailing List , linux-block , Hannes Reinecke , Johannes Thumshirn , Christoph Hellwig , Sagi Grimberg Subject: Re: [PATCH V2 7/8] nvme: use blk_mq_queue_tag_inflight_iter Message-ID: <20190326235726.GC4328@localhost.localdomain> References: <1553492318-1810-1-git-send-email-jianchao.w.wang@oracle.com> <1553492318-1810-8-git-send-email-jianchao.w.wang@oracle.com> <20190325134917.GA4328@localhost.localdomain> <70e14e12-2ffc-37db-dd8f-229bc580546e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 25, 2019 at 08:05:53PM -0700, jianchao.wang wrote: > What if there used to be a io scheduler and leave some stale requests of sched tags ? > Or the nr_hw_queues was decreased and leave the hctx->fq->flush_rq ? Requests internally queued in scheduler or block layer are not eligible for the nvme driver's iterator callback. We only use it to reclaim dispatched requests that the target can't return, which only applies to requests that must have a valid rq->tag value from hctx->tags. > The stable request could be some tings freed and used > by others and the state field happen to be overwritten to non-zero... I am not sure I follow what this means. At least for nvme, every queue sharing the same tagset is quiesced and frozen, there should be no request state in flux at the time we iterate.