From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DDC4C433F5 for ; Wed, 15 Sep 2021 00:08:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5508860E8B for ; Wed, 15 Sep 2021 00:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236112AbhIOAKG (ORCPT ); Tue, 14 Sep 2021 20:10:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46939 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbhIOAKF (ORCPT ); Tue, 14 Sep 2021 20:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631664526; h=from:from:reply-to:subject:subject: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=j3gS2bVHtavXJZxhTa4jjCutn22zS2x7UQx9KxqqqFw=; b=E+Xo9/ko4hUrUHny5QrPoS4ZXUphwKUN755UxH+wGDBOItqRkkSs6GyV+fCHUOPGuVvrlg DfF+kJ6fYp6KXMZCCYLocKlF8IiYi/pYuoRu3FosMiuLibtUasUHX8CgHK30iOZtQfKSCB uZ4LPuTsggbM4uSve1lJ8SeamNTrST4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-124-euj7gUv1OuK5UkuNAtA6rw-1; Tue, 14 Sep 2021 20:08:43 -0400 X-MC-Unique: euj7gUv1OuK5UkuNAtA6rw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5D61108468B; Wed, 15 Sep 2021 00:08:41 +0000 (UTC) Received: from T590 (ovpn-12-59.pek2.redhat.com [10.72.12.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A7E35D9F4; Wed, 15 Sep 2021 00:08:33 +0000 (UTC) Date: Wed, 15 Sep 2021 08:08:43 +0800 From: Ming Lei To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hannes Reinecke , Sagi Grimberg , Keith Busch , Wen Xiong , Himanshu Madhani , James Smart Subject: Re: [PATCH v7 3/3] nvme-fc: Remove freeze/unfreeze around update_nr_hw_queues Message-ID: References: <20210914092008.40370-1-dwagner@suse.de> <20210914092008.40370-4-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914092008.40370-4-dwagner@suse.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 11:20:08AM +0200, Daniel Wagner wrote: > From: James Smart > > Remove the freeze/unfreeze around changes to the number of hardware > queues. Study and retest has indicated there are no ios that can be > active at this point so there is nothing to freeze. > > nvme-fc is draining the queues in the shutdown and error recovery path > in __nvme_fc_abort_outstanding_ios. > > This patch primarily reverts 88e837ed0f1f "nvme-fc: wait for queues to > freeze before calling update_hr_hw_queues". It's not an exact revert as > it leaves the adjusting of hw queues only if the count changes. > > Signed-off-by: James Smart > [dwagner: added explanation why no IO is pending] > Signed-off-by: Daniel Wagner > --- > drivers/nvme/host/fc.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c > index 6ebe68396712..aa14ad963d91 100644 > --- a/drivers/nvme/host/fc.c > +++ b/drivers/nvme/host/fc.c > @@ -2957,9 +2957,7 @@ nvme_fc_recreate_io_queues(struct nvme_fc_ctrl *ctrl) > dev_info(ctrl->ctrl.device, > "reconnect: revising io queue count from %d to %d\n", > prior_ioq_cnt, nr_io_queues); > - nvme_wait_freeze(&ctrl->ctrl); > blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues); > - nvme_unfreeze(&ctrl->ctrl); > } Both connect queue and ns queues are added to this tag_set, so blk_mq_update_nr_hw_queues() will freeze them all before updating nr_hw_queues. Reviewed-by: Ming Lei -- Ming