[PATCH v7 4/9] nvme-multipath: add support for latency I/O policy

John Garry john.g.garry at oracle.com
Mon Aug 10 01:12:26 PDT 2026


On 09/08/2026 11:07, Nilay Shroff wrote:
> +	/*
> +	 * If latency > ~1s then ignore this sample to prevent EWMA from being
> +	 * skewed by pathological outliers (multi-second waits, controller
> +	 * timeouts etc.). This keeps path scores representative of normal
> +	 * performance and avoids instability from rare spikes. If such high
> +	 * latency is real, ANA state reporting or keep-alive error counters
> +	 * will mark the path unhealthy and remove it from the head node list,
> +	 * so we safely skip such sample here.
> +	 */
> +	if (unlikely(latency > NSEC_PER_SEC)) {
> +		stat->nr_ignored++;
> +		dev_warn_ratelimited(ns->ctrl->device,
> +			"ignoring sample with >1s latency (possible controller stall or timeout)\n");
> +		return;
> +	}

JFYI, I gave this series a spin and I see this warn a lot:

# ./fio_read.sh nvme1n1
iops: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T)
4096B-4096B, ioengine=libaio, iodepth=100
...
fio-3.38
Starting 10 processes
[  130.005374] nvme_mpath_add_sample: 29 callbacks suppressed03h:08m:36s]
[  130.005387] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.009968] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.013176] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.019576] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.022275] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.024762] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.027268] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.130140] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.132316] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
[  130.139279] nvme nvme2: ignoring sample with >1s latency (possible
controller stall or timeout)
^Cbs: 10 (f=10): [R(10)][0.4%][r=35.8MiB/s][r=9171 IOPS][eta 03h:07m:44s]
fio: terminating on signal 2

iops: (groupid=0, jobs=10): err= 0: pid=821: Mon Aug 10 08:08:28 2026
    read: IOPS=9239, BW=36.1MiB/s (37.8MB/s)(1434MiB/39744msec)
      slat (usec): min=25, max=110836, avg=129.22, stdev=537.18

Note that I do have many heavy kernel debug options enabled, like kasan 
and kmemleak, which may influence this.





More information about the Linux-nvme mailing list