[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS8kP-bfOmZ-3W9E@kbusch-mbp>
Date: Tue, 2 Dec 2025 10:39:11 -0700
From: Keith Busch <kbusch@...nel.org>
To: "Heyne, Maximilian" <mheyne@...zon.de>
Cc: Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvme: Let the blocklayer set timeouts for requests
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.
Powered by blists - more mailing lists