-
Notifications
You must be signed in to change notification settings - Fork 697
nvme: add support for nvme top #2989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Will do consider to change the PR changes to add |
2a0fb7a to
50ece42
Compare
|
Hi @igaw, @shroffni and @martin-belanger, Just updated the PR changes to add |
|
After looking at the code, it does not seem appropriate to add a --delay option at the global configuration level. The main issue is that a global --delay does not make sense for all nvme-cli commands. For example, commands such as create-ns or delete-ns should not accept a --delay option. If create-ns were invoked with a non-zero delay, it could repeatedly create namespaces in a loop until the device runs out of space. Similarly, commands like delete-ns, set-feature, format, and several others have no meaningful semantics when executed periodically with a delay. If the goal is simply to monitor or repeatedly execute a command, the existing watch utility already provides this functionality. While watch may not be the most efficient solution, it is sufficient for user-space tooling and works reasonably well today. If we still believe that a --delay option is necessary, then it should be added selectively, only to those nvme-cli sub-commands where periodic execution actually makes sense. One such example is show-topology, and this could also be useful for upcoming tools like nvme-top. In summary, rather than introducing a global --delay option, it would be better to:
|
|
I agree with @shroffni's arguments. |
This is to monitor the system changes. Signed-off-by: Tokunori Ikegami <[email protected]>
|
Just changed the PR commit to add the option only for the show-topology command at first. Thank you. |
|
It’s good that the --delay option is now limited to show-topology. However, the current implementation lacks scrolling support, which makes it difficult to use in systems with many subsystems or namespaces. In such cases, the show-topology output may not fit on a single screen, and with the current behavior it becomes inconvenient—or effectively impossible—to view the full output. For comparison, it would be useful to look at how tools like top handle scrolling and screen updates. I added your patch on my system, and found that the screen flickers noticeably, and the rendering does not appear smooth when the output is repainted on every --delay interval. This also needs improvement. One possible optimization would be to compare the output between two intervals and avoid repainting the screen if the output has not changed. To further minimize flickering, it would also help to collect the entire command output into a single buffer and render it in one operation, rather than printing each line individually as it is generated. There would be some other alternatives as well to avoid flickering. I'd suggest review implementation of tools like watch/top etc. |
This is to monitor the system changes.