From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752020AbeA2Tzq (ORCPT ); Mon, 29 Jan 2018 14:55:46 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:34794 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbeA2Tzp (ORCPT ); Mon, 29 Jan 2018 14:55:45 -0500 X-Google-Smtp-Source: AH8x226hlD4UJtCAgC67APYMhbsPiNGbbmq9GOaqIQtD0p0HuLZAaHqqYw78mxDoIexDY8djdvYyyg== Subject: Re: [PATCH] nvme-pci: use NOWAIT flag for nvme_set_host_mem To: Keith Busch , Jianchao Wang Cc: axboe@fb.com, hch@lst.de, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <1517195255-21832-1-git-send-email-jianchao.w.wang@oracle.com> <20180129160145.GA25515@localhost.localdomain> From: Sagi Grimberg Message-ID: <1b7d3700-945f-9272-b6aa-d2ebeaf0cb1e@grimberg.me> Date: Mon, 29 Jan 2018 21:55:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180129160145.GA25515@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Keith, > Thanks for the fix. It looks like we still have a problem, though. > Commands submitted with the "shutdown_lock" held need to be able to make > forward progress without relying on a completion, but this one could > block indefinitely. Can you explain to me why is the shutdown_lock needed to synchronize nvme_dev_disable? More concretely, how is nvme_dev_disable different from other places where we rely on the ctrl state to serialize stuff? The only reason I see would be to protect against completion-after-abort scenario but I think the block layer should protect against it (checks if the request timeout timer fired).