[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <697242db-b748-4b27-9e60-44e81a6644bb@grimberg.me>
Date: Sun, 4 Jan 2026 23:19:09 +0200
From: Sagi Grimberg <sagi@...mberg.me>
To: Randy Jennings <randyj@...estorage.com>
Cc: Mohamed Khalfella <mkhalfella@...estorage.com>,
Chaitanya Kulkarni <kch@...dia.com>, Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>, Keith Busch <kbusch@...nel.org>,
Aaron Dailey <adailey@...estorage.com>, John Meneghini
<jmeneghi@...hat.com>, Hannes Reinecke <hare@...e.de>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 10/14] nvme-tcp: Use CCR to recover controller that
hits an error
On 31/12/2025 2:13, Randy Jennings wrote:
> On Sat, Dec 27, 2025 at 2:35 AM Sagi Grimberg <sagi@...mberg.me> wrote:
>> On 26/11/2025 4:11, Mohamed Khalfella wrote:
> ...
>>> + dev_info(ctrl->device,
>>> + "CCR failed, switch to time-based recovery, timeout = %ums\n",
>>> + jiffies_to_msecs(rem));
>>> + set_bit(NVME_CTRL_RECOVERED, &ctrl->flags);
>>> + queue_delayed_work(nvme_reset_wq, &to_tcp_ctrl(ctrl)->err_work, rem);
>>> + return -EAGAIN;
>> I don't think that reusing the same work to handle two completely
>> different things
>> is the right approach here.
>>
>> How about splitting to fence_work and err_work? That should eliminate
>> some of the
>> ctrl state inspections and simplify error recovery.
> If the work was independent and could happen separately (probably
> in parallel), I could understand having separate work structures. But they
> are not independent, and they have a definite relationship.
The relationship that is defined here is that error recovery does not start
before fencing is completed.
> Like Mohamed,
> I thought of them as different stages of the same work. Having an extra
> work item takes up more space (I would be concerned about scalability to
> thousands or 10s of thousands of associations and then go one order of
> magnitude higher for margin), and it also causes a connection object
> (referenced during IO) to take up more cache lines. Is it worth taking up
> that space, when the separate work items would be different, dependent
> stages in the same process?
Yes, IMO the added space of an additional work_struct is much better than
adding more state around a single work handler that is queued up multiple
times doing effectively different things.
Powered by blists - more mailing lists