Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4324395pxt; Wed, 11 Aug 2021 03:29:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+rVcIVXGTjfbJKFGenkFRxubOYwpFjria4fzax63QNKVxeMKMLs0AH9moyGkc0eSrwXg8 X-Received: by 2002:a05:6e02:1308:: with SMTP id g8mr240904ilr.190.1628677754424; Wed, 11 Aug 2021 03:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628677754; cv=none; d=google.com; s=arc-20160816; b=VIw4sq9EdHYyTQ49S32BYDjMfAdir2v66A8FrJZyq3eQr0QUrdPpsejr+WBZ2H5SQO v06PRYTpnSQ0ruso8uEj42RB4KOaYetCgWFIwqLlLw3dnfWSLHKp/fouLrdV6gzbw7L0 zlCDjgRgirAoGez7ygv8h2M3t2Mh+P6+r561QH+3s4splVXVmXe/cs3vTZ1/KYvN7IAE VNhpl6i2tLVx4VisONQgzKWBTgzEb/i+CFxy+18prCZ5F26bigQI/UQy/ZNT9rQl5mnt ELKwfZQFgcbqMwL2iqvIaK5BmHFuF0nN+9THWYy3hPTik8LtjAlkrpaMOhlb+Ze/IB6y w+KA== 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 :dkim-signature; bh=dIVroiF9CWXaHpVcigCtxn4G9TJ5tno4t7MoqivtmBE=; b=TgRftjbQOr30LmkG2nxY0JNY0kTwJ8JzdiQRyltE5MiV9DXAh+eFci1jWJhk0PchCP 1Fe3Dn6blFJm6D09FRM4V/TqBvBQq9HwFtaYjGDQOMJ1OYubjrue1hZZCRtsDNTdC00l MIoShmAmSd4i5i9p3DbDmZe9rQhsivU6V9qoGBazDpoV0j/VOl/vpzO7imnGaFbARlXo rqilCdwPFipKgx/Ia8d8OH4fmB/nqsytGfpnxBNL/hxnHrbJY5eR5NUYYbF1e6Sg8cP8 TX0Xyivy7J867DKCSlXsIYnK3dq8x8826JCBlFm4miatRyOE3jRdiqpKnDb45vcfGGHI XvpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=b+SuKVfs; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=88LED16u; 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=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si25029693ilj.42.2021.08.11.03.29.02; Wed, 11 Aug 2021 03:29:14 -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=@suse.de header.s=susede2_rsa header.b=b+SuKVfs; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=88LED16u; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237175AbhHKK0c (ORCPT + 99 others); Wed, 11 Aug 2021 06:26:32 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:50720 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236894AbhHKK0R (ORCPT ); Wed, 11 Aug 2021 06:26:17 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C49081FE29; Wed, 11 Aug 2021 10:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1628677553; h=from:from:reply-to: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=dIVroiF9CWXaHpVcigCtxn4G9TJ5tno4t7MoqivtmBE=; b=b+SuKVfs3TEK9nrziOok74mNZMgUtiymJF99t0VR8N6PbJOj4rqd7s7kiJeR5uwkFJE3V1 qUuRkJhU8f8/CcC6xfB8bQ3ZpF2d4GnhJg1XqaXKt8Voxto9QGaBYOa1VSDjUz72YRjtih Dfku/ugQMlkKEyOeoAWGJMbPyGnXvFE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1628677553; h=from:from:reply-to: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=dIVroiF9CWXaHpVcigCtxn4G9TJ5tno4t7MoqivtmBE=; b=88LED16uP9Jki6B+ocpzbFNhVd5PaojtVuvOjAht+8CLWYWTDGJ9K3HcZ5vgvumzwoISXg sp9gxICXsIV91YAQ== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id ABDC8131F5; Wed, 11 Aug 2021 10:25:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id MS2KKbGlE2GbDgAAGKfGzw (envelope-from ); Wed, 11 Aug 2021 10:25:53 +0000 Date: Wed, 11 Aug 2021 12:25:53 +0200 From: Daniel Wagner To: Sagi Grimberg Cc: Keith Busch , 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: <20210811102553.auradulozluc5ond@carbon.lan> 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> <20210811010718.GA3135947@dhcp-10-100-145-180.wdc.com> <079108ce-6ca0-800e-e3df-29d015a4530c@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <079108ce-6ca0-800e-e3df-29d015a4530c@grimberg.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 10:57:58PM -0700, Sagi Grimberg wrote: > > > 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. > > Exactly what I was trying to point out (poorly though) Thanks for explaining. I think I got the general idea what the different states are doing and what the transitions are now. (famous last words). Anyway, the first three patches are the result of debugging the case of 'prior_ioq_cnt != nr_io_queues'. Starting the queues before updating the number of queues lookes strange. I suppose in the case 'prior_ioq_cnt > nr_io_queues', nvme_tcp_start_io_queues() should be successful and we do the blk_mq_update_nr_hw_queues(). In the other case we should land in the error recovery. Wouldn't it make sense to always exercise the error recovery path if we detect 'prior_ioq_cnt != nr_io_queues' and reduce the number of things which can go wrong? Daniel