Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1002726pxv; Fri, 25 Jun 2021 03:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgONxEcN1eubAVw2MO7dTw5SZEMWK00FLg2+IybRRAZxq51ha34elRmsyAhSGb2gl6lEAo X-Received: by 2002:a17:907:7709:: with SMTP id kw9mr10248178ejc.68.1624616360656; Fri, 25 Jun 2021 03:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624616360; cv=none; d=google.com; s=arc-20160816; b=KsTl12IzEr48l5tmrQ9Jy2k56Rret3eFwXMLbtd4ZiaG08uYr4nJjo3lITQeRKrgDc jMgYRyIcNj9P2M9fKclytslQhwycVaV98p/o/Ow0nFQMst7z2eh3tvXMwc6VPZaoYp6l 50MNaQcYG8dTvqyr+BvoXMrWXqVJJ7zJbFepPoyLtFDG6U9lhOV+fHP2ASXksJw743UK g2bY08b5NU7hAbYWobOzYizpte7ykkF40xtNztsDm/19mDfr7zAsByxF8x7lrVZEjhHz itgFdZjCjohwKEYD5DNCFQ+EbWs1wkUV81gM8qYXmjvFZU+EyAWvp+xJqrYmBqJERXi3 +Q5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=Dfo/oMFhioRwNqYhFs8xw+OHX0Au8i83hWIWvQKrzA8=; b=DVE6hRFXUDG4678pNJE5300zSuxP9HPRVC8DI9VcPGdDR6/2urnVRhg2Gh3D0g06Ld hMKGDF0tPRFVELaC52J6Si0itTApd1Gyt51WkpfIiCckS0fpvfRTPLCZ5xAAjba+z8m+ ias3ey6mA42Ym4KKzCx2bRiGXdOvE4x1okj+nsB6wI37yHFLwJYayWEbQ86G2ll3eW8g uFNWWnNWPdxKWeOlG1vjgMOCwDKBuSrdjAY0qbdJDkfVxO6THneflNloiyMgED7tblix jtyD15kbPbYlJ25ecCr5agXi7VsaeEtKv8rH5hCrVGX9CRFI5ZMpT28KdjmK8pCjtkbc 0OdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Fp35AvFd; dkim=neutral (no key) header.i=@suse.de; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de13si5325024ejc.314.2021.06.25.03.18.56; Fri, 25 Jun 2021 03:19:20 -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=Fp35AvFd; dkim=neutral (no key) header.i=@suse.de; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231434AbhFYKUF (ORCPT + 99 others); Fri, 25 Jun 2021 06:20:05 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:53318 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbhFYKTU (ORCPT ); Fri, 25 Jun 2021 06:19:20 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 6E8F51FE7B; Fri, 25 Jun 2021 10:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624616218; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Dfo/oMFhioRwNqYhFs8xw+OHX0Au8i83hWIWvQKrzA8=; b=Fp35AvFdFTLqdyWdfxu4IfEbP7+LYZ43dHp49PGhPfr8YvXoQPs6UbA0gmWpJNjjZuE7cn hopY7wse8Jy303pIKR7qPwDOiHS9bBKW+cuM9N2Ih4Pzxda8CujcqgOAz80sUDeTUPbjKm QhPPE/VAVWfTgOcPUk8776ZaTDJ5+3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624616218; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Dfo/oMFhioRwNqYhFs8xw+OHX0Au8i83hWIWvQKrzA8=; b=NsZFF+P6sxEcIq5+9jClWXR6PH5Kve3okMiy1jZrXw/CRYuBvCP2hX9aDt1M5uoIUB9GG/ PmAE2bWOII5FRMDA== Received: from adalid.arch.suse.de (adalid.arch.suse.de [10.161.8.13]) by relay2.suse.de (Postfix) with ESMTP id 94354A3BEE; Fri, 25 Jun 2021 10:16:57 +0000 (UTC) Received: by adalid.arch.suse.de (Postfix, from userid 17828) id 81C5E51709BB; Fri, 25 Jun 2021 12:16:57 +0200 (CEST) From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, James Smart , Keith Busch , Jens Axboe , Ming Lei , Sagi Grimberg , Daniel Wagner Subject: [PATCH 0/2] Handle update hardware queues and queue freeze more carefully Date: Fri, 25 Jun 2021 12:16:47 +0200 Message-Id: <20210625101649.49296-1-dwagner@suse.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this is a followup on the crash I reported in https://lore.kernel.org/linux-block/20210608183339.70609-1-dwagner@suse.de/ By moving the hardware check up the crash was gone. Unfortuntatly, I don't understand why this fixes the crash. The per-cpu access is crashing but I can't see why the blk_mq_update_nr_hw_queues() is fixing this problem. Even though I can't explain why it fixes it, I think it makes sense to update the hardware queue mapping bevore we recreate the IO queues. Thus I avoided in the commit message to say it fixes something. Also during testing I observed the we hang indivinetly in blk_mq_freeze_queue_wait(). Again I can't explain why we get stuck there but given a common pattern for the nvme_wait_freeze() is to use it with a timeout I think the timeout should be used too :) Anyway, someone with more undertanding of the stack can explain the problems. Thanks, Daniel Daniel Wagner (2): nvme-fc: Update hardware queues before using them nvme-fc: Wait with a timeout for queue to freeze drivers/nvme/host/fc.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) -- 2.29.2