libnvme: add command execution time detector
To improve OOB NVMe-MI debuggability, this patch will check command
execution time, if it exceeds WARNING_THRESHOLD (3 seconds), print
a warning message about the command information.
Tested:
With this patch, we can detect some suspiciously NVMe-MI commands
which may take long time :
https://paste.googleplex.com/4698907106869248
Google-Bug-Id: 300524907#comment20
Change-Id: Id3d7ff62cea1aef40131b8b05eb014d72152ceb8
Signed-off-by: Jinliang Wang <jinliangw@google.com>
(cherry picked from commit 9363819dc9dbcc4c70c381d76229b02b72dbd259)
3 files changed