mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Qiliang Yuan <qiliang.yuan@linux.dev>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/3] nvme-multipath: keep a large delayed_removal_secs from wrapping around
Date: Fri, 20 Nov 2026 23:05:46 +0530	[thread overview]
Message-ID: <70f1a219-05cd-44c5-9d34-b30b00539a93@linux.ibm.com> (raw)
In-Reply-To: <20261119-bug-nvme-mpath-set-live-srcu-v6-1-da85b18b274b@linux.dev>

On 11/20/26 6:55 AM, Qiliang Yuan wrote:
> nvme_mpath_remove_disk() delays the removal of a namespace head that
> lost its last path by delayed_removal_secs, which it converts to
> jiffies as delayed_removal_secs * HZ.
> 
> delayed_removal_secs is an unsigned int, so the product is computed in
> 32 bits and wraps around for values above UINT_MAX / HZ. With HZ=1000,
> 4294968 seconds turns into a delay of 704 jiffies, and the head goes
> away in under a second instead of after about 50 days.
> 
> Compute the delay in 64 bits and cap it at MAX_JIFFY_OFFSET.
> 
> With delayed_removal_secs set to 4294968 at HZ=1000, removing the last
> path deletes the head after (mean of two runs, min-max in parentheses;
> "> 10000" means it was still there 10 s later):
> 
>    before (ms)     after (ms)
>    858 (856-860)   > 10000
> 
> Fixes: 62188639ec160 ("nvme-multipath: introduce delayed removal of the multipath head node")
> Signed-off-by: Qiliang Yuan <qiliang.yuan@linux.dev>

Looks good to me:

Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>

  reply	other threads:[~2026-11-20 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  1:25 [PATCH v6 0/3] nvme-multipath: requeue work fixes Qiliang Yuan
2026-11-20  1:25 ` [PATCH v6 1/3] nvme-multipath: keep a large delayed_removal_secs from wrapping around Qiliang Yuan
2026-11-20 17:35   ` Nilay Shroff [this message]
2026-11-20  1:25 ` [PATCH v6 2/3] nvme-multipath: apply delayed_removal_secs changes to a pending removal Qiliang Yuan
2026-11-20  1:25 ` [PATCH v6 3/3] nvme-multipath: don't wait for a grace period in nvme_mpath_set_live() Qiliang Yuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70f1a219-05cd-44c5-9d34-b30b00539a93@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=qiliang.yuan@linux.dev \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®