[PATCH 1/2] nvme-core: add ctrl state transition debug helper
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Feb 20 21:34:30 PST 2024
On 2/11/24 20:26, Chaitanya Kulkarni wrote:
> NVMe controller state machine has total 7 states and 13 state transition
> arcs. Debugging NVMeOF problems in the field is not straight-froward,
> since it involves complex combination of connect/reconnect/kato/timeout
> handlers etc scenarios.
> We already have a helper in sysfs.c that reads the controller state, but
> one has to constantly read the state in order understand the complete
> state transition which is very inconvenient.
>
> It is often helpful to know full state transition of controller when
> dealing with NVMeOF issues at the time of analyzing the trace.
>
> Add a helper that allows us to decode and print each controller state
> transition :-
>
> blktests (master) # dmesg -c | grep nvme_change_ctrl_state
> blktests (master) # nvme_trtype=tcp ./check nvme/048
> nvme/048 (Test queue count changes on reconnect) [passed]
> runtime 6.264s ... 5.240s
> blktests (master) # dmesg -c | grep nvme_change_ctrl_state
> [17080.988689] nvme nvme0: nvme_change_ctrl_state new -> connecting
> [17081.006623] nvme nvme0: nvme_change_ctrl_state connecting -> live
> [17081.038313] nvme nvme0: nvme_change_ctrl_state live -> resetting
> [17081.040730] nvme nvme0: nvme_change_ctrl_state resetting -> connecting
> [17083.056750] nvme nvme0: nvme_change_ctrl_state connecting -> live
> [17083.075906] nvme nvme0: nvme_change_ctrl_state live -> resetting
> [17083.076112] nvme nvme0: nvme_change_ctrl_state resetting -> connecting
> [17085.105270] nvme nvme0: nvme_change_ctrl_state connecting -> live
> [17086.126484] nvme nvme0: nvme_change_ctrl_state live -> deleting
> [17086.126506] nvme nvme0: nvme_change_ctrl_state deleting -> deleting (no IO)
> blktests (master) #
>
> Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
> ---
>
gentle ping ...
-ck
More information about the Linux-nvme
mailing list