From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B4222C0F96 for ; Tue, 2 Dec 2025 17:39:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764697154; cv=none; b=BzUlGLbs9ZM5DvQ0Uk7pY8KjLW9pwx89zoOG2X3Di6vvE+zpoWFbhfp9BSiVbTqXM10lWmWKntSdYQQ1EyGlDU0H82U7lFgpiEHi/U0SG3PNxcsGl/GZw2i0ukp73XiVUYPAXnLDEUnkIl0qg2UCUK4jtu2HDyhwtayUKc+dX5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764697154; c=relaxed/simple; bh=RNXcKa0/kxYrBJCsHyydpFEke2NwZRooOqMEFxmZEzI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y6Xb+9a6iMt00KzGmQr5Pp1TtIWUwenvcb6XpBLMs7OIeKEo8M3Wuw746SBqFifpCq33GVJHKTolS/nQ4vVgroJMJR6qYQSPKhYdMMEMOS6L2F3CtGADNRn5PJJx2eh3ek44b5WMACjwEPRroM+yzDQ1HqLdfwBURwTlS8mjMAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pa21I66H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pa21I66H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 467CBC4CEF1; Tue, 2 Dec 2025 17:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764697153; bh=RNXcKa0/kxYrBJCsHyydpFEke2NwZRooOqMEFxmZEzI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pa21I66HNsU4RwhgGbggxOWWMnXuyk+AXBjM9LuE0U1W5hkzGDojRlqS+awPNhCkv XU1XlpPXIJaPyoBViAQJU+ZxA1hxDjTWl2W9yBR+7CttruYxA+uj2eCPux7EQiUhkk tuRJxcsKwpMhWmGY3N2oqNEQU3rHfEmzGa4RaE8Ql61CrwB+NtZz3PyffWWDYb28ad HWxg0xUXHPVnO8Hlw10LpzFgr5dNwZZ7GkmrXRGMtCoBBTwzSKsvFxpUSAYeNlnNjt 65vlnm9nTGXvIAEGLvhLnpqhDpD7IhwhUmWOFnJgFjL65/03ppuRk74BDs3WA8CKNC GS6SAxCkhPz1w== Date: Tue, 2 Dec 2025 10:39:11 -0700 From: Keith Busch To: "Heyne, Maximilian" Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] nvme: Let the blocklayer set timeouts for requests Message-ID: References: <20251202-arrow-debris-c25524e1@mheyne-amazon> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251202-arrow-debris-c25524e1@mheyne-amazon> On Tue, Dec 02, 2025 at 01:58:19PM +0000, Heyne, Maximilian wrote: > When initializing an nvme request which is about to be send to the block > layer, we do not need to initialize its timeout. If it's left > uninitialized at 0 the block layer will use the request queue's timeout > in blk_add_timer (via nvme_start_request which is called from > nvme_*_queue_rq). These timeouts are setup to either NVME_IO_TIMEOUT or > NVME_ADMIN_TIMEOUT when the request queues were created. > > Because the io_timeout of the IO queues can actually be modified via > sysfs, the following situation can occur: > > 1) NVME_IO_TIMEOUT = 30 (default module parameter) > 2) nvme1n1 is probed. IO queues default timeout is 30 s > 3) manually change the IO timeout to 90 s > echo 90000 > /sys/class/nvme/nvme1/nvme1n1/queue/io_timeout > 4) nvme zns report-zones /dev/nvme1n1 > This command issues IO commands with timeout 30 s instead of the > wanted 90 s which might be more suitable for this device. Does this example really use 30s, though? User space commands should be going through nvme_submit_user_cmd(), which overrides the timeout set from the nvme_init_request with whatever the user requested (usually 0). The code change looks fine, though.