Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4030768pxt; Tue, 10 Aug 2021 18:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWErOhFM03vRytJyls2LKqG6Bb6Plw0haKVzttpayCBCP2VEoWgATYbsDnTa04a4Zr92W3 X-Received: by 2002:a5d:8986:: with SMTP id m6mr48837iol.87.1628644092559; Tue, 10 Aug 2021 18:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628644092; cv=none; d=google.com; s=arc-20160816; b=bRUMHU/XSXU5HxgbZc9aEg7009zYfyXdIw6OppobKHhu0YcBsclGP6IiTXjdzZ+9o1 rdWPhB6F8G0NMH2Hz/ngDVUU4wWQO0qUWu6haIPal50S7aGyljOZYQaM9yAYnK2OCWwl Yh4slpXYNMkEFGWHtnMVtm7HmhlAGQJdTdzjQ530YrhpCPN3viv2MMx5kRW/ZE8SLs/1 icTwfD9wE8WTfRwiSq/HWGpLLuoIOYXowkrIP4vSkiORc1nYdVf9V3HuJU1qUgNSNVHj l2Lq1EWEYEK+vcm0V44txBLfho1BL+e0I0e6xPPCwCqofmPC4vR6XoHEnK6NB7fxiz07 gVcQ== 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=pyJlgj8fIIDlkFEfkadwdAc+wHb0A8TpPw45NxZBk9Y=; b=oRl+8zB0hzeAolbl6QwM+MGnY/UAiev2oYXkbEC3tpcR+c4a9Sq96NiD3m4tUMCPsZ lA8X+te7CzK2G7sW3uA+QYFqNgdX9S6aZICL0v7vpH4Ej3nwzjLQyPxB8udV9LN3lx/V KOK6SRP9LzmcAsoNRdNCMoQiniccQvB2Dg9Xofw1JbXcU59Lt+RaQ9G91fXfNXHMAGz7 oEkmvfTVTfr0PkD9tZnd8aemZClSmCMKFo9+Z6CnvROyQ4zuZpW2cbtFVrOT7q3ZqD83 9WGUJAKxX9vkjT8D/n2+/9Mm78HETh0kX8tkLnajUAZgdmeQVs67runw2spLtItvChkS HsDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rkpMUw07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si13666328jat.59.2021.08.10.18.08.00; Tue, 10 Aug 2021 18:08:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rkpMUw07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235957AbhHKBHo (ORCPT + 99 others); Tue, 10 Aug 2021 21:07:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:60014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235974AbhHKBHn (ORCPT ); Tue, 10 Aug 2021 21:07:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1DAED60EE7; Wed, 11 Aug 2021 01:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628644040; bh=Kzw3EE08cLDDxpFKCb5ghCcQ8BT9rSSf34MuXPqd2js=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rkpMUw07zaqXpsN6IamkLlptJqRCTggAPkqO/kzKQN5yd9b7wECe4OB5fi0lNoRqE bqCVEAoTAuJf5bWouBr88yLnquj85hY/QYn/TlutxszsuF1bKui8XIqitQ3myBBzel mp8UzrJbehkoPX/zciSaxEyWwrwgtrAolPzV+ewDdgJwj22DRfBzVsBHMh8yl9y08g u8PHKj+UM5hlOeaBX3yVljGP1z313P2kVNxaSQVmG8QS7kWrk+ESFTKU3ZIjRbd/z4 mI30XJn7GN/byHrxo+dS8KaYvCUypoOsQDQXSjQN9h8yPIfmKHQ+lAbXuU4DPUQ4a+ d2KV7TWJLT7xg== Date: Tue, 10 Aug 2021 18:07:18 -0700 From: Keith Busch To: Sagi Grimberg Cc: Daniel Wagner , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, James Smart , Ming Lei , Hannes Reinecke , Wen Xiong Subject: Re: [PATCH v4 2/8] nvme-tcp: Update number of hardware queues before using them Message-ID: <20210811010718.GA3135947@dhcp-10-100-145-180.wdc.com> References: <20210802112658.75875-1-dwagner@suse.de> <20210802112658.75875-3-dwagner@suse.de> <8373c07f-f5df-1ec6-9fda-d0262fc1b377@grimberg.me> <20210809085250.xguvx5qiv2gxcoqk@carbon> <01d7878c-e396-1d6b-c383-8739ca0b3d11@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01d7878c-e396-1d6b-c383-8739ca0b3d11@grimberg.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 06:00:37PM -0700, Sagi Grimberg wrote: > > > On 8/9/21 1:52 AM, Daniel Wagner wrote: > > Hi Sagi, > > > > On Fri, Aug 06, 2021 at 12:57:17PM -0700, Sagi Grimberg wrote: > > > > - ret = nvme_tcp_start_io_queues(ctrl); > > > > - if (ret) > > > > - goto out_cleanup_connect_q; > > > > - > > > > - if (!new) { > > > > - nvme_start_queues(ctrl); > > > > + } else if (prior_q_cnt != ctrl->queue_count) { > > > > > > So if the queue count did not change we don't wait to make sure > > > the queue g_usage_counter ref made it to zero? What guarantees that it > > > did? > > > > Hmm, good point. we should always call nvme_wait_freeze_timeout() > > for !new queues. Is this what you are implying? > > I think we should always wait for the freeze to complete. Don't the queues need to be started in order for the freeze to complete? Any enqueued requests on the quiesced queues will never complete this way, so the wait_freeze() will be stuck, right? If so, I think the nvme_start_queues() was in the correct place already.