FEMU does not receive actions generated by nvme-cli.
allencho1222 opened this issue · 2 comments
version info:
- Guest OS: Ubuntu 22.04 (kernel version: 5.19.17-051917-generic)
- Kernel is not modified as shown in here.
- FEMU: master branch
- nvme-cli: 2.3
- libnvme: 1.3
- fio: 3.33
I am currently using ZNS mode (run-zns.sh)
and trace functions described here to figure out how FEMU works.
I found something goes wrong:
- NVMe actions (e.g., reset-zone, close-zone, zone-append) generated by
nvme-cli
are not captured in FEMU, which means that FEMU does not call related functions (traces are not printed). For example,nvme_io_cmd
is not calledsq->tail
is not updated- ...
However, reports from nvme zns report-zones /dev/nvme0n1
shows correct results upon the actions. For example,
- when resetting zones, report shows that zones are reset.
(When reading and writing using fio
, FEMU correctly calls related functions (traces are printed)).
Updated:
- Sometimes,
sq->tail
is updated and related functions (e.g.,zns_zone_append
,zns_reset_zone
) are called.
What I did:
- zones are reset (
sudo blkzone reset /dev/nvme0n1
) after executing multiple zone-append (echo "hello world" | sudo nvme zns zone-append /dev/nvme0n1 -z 512
).
zns_reset_zone
is called.
What I did:
- I executed
sudo nvme zns reset-zone /dev/nvme0n1
multiple times (e.g., 200 times)
Why are not the functions in FEMU instantly called after executing a single command of nvme-cli
?
(It seems that commands are batched before they are sent to the storage).
It depends on how often the nvme driver decides to ring the doorbell, not always synchronous for perf reasons. This is totally driver/software behavior, unrelated to FEMU.
Thank you for your quick response!