hoytech / vmtouch

Portable file system cache diagnostics and control
https://hoytech.com/vmtouch/
BSD 3-Clause "New" or "Revised" License
1.79k stars 210 forks source link

Please add -w wait until all pages are locked to manual #90

Open tycho-kirchner opened 3 years ago

tycho-kirchner commented 3 years ago

Hi, and thanks for this tool (: The important option -w misses in the manual and is only displayed when issuing --help. This is confusing. After all, in daemon mode intuitively I expected a non-zero exit code on error, which is only the case, if -w is passed. I think this should be changed, if a user is not interested in the return value, he could simply launch vmtouch async using the ampersand &.

Thanks Tycho

hoytech commented 3 years ago

I agree on all counts. In fact, I would like to make -d imply -w if possible. Are there any backwards-compatibility problems if we do that?

About adding -w to the manual, can you please send in a pull request? Thank you!

cy7yz2rj commented 3 years ago

Being left out of the manpage means I've only now discovered the -w option. I had a script for launching discrete vmtouch -dL instances that relied on -w being absent; each vmtouch process would read from a different physical HDD so they could all run concurrently.

If I understand correctly, making -d imply -w would make my vmtouch invocations run sequentially instead of simultaneously. I'm not against the change, in fact I've already updated my script to use -dwL, just pointing out a possible scenario where it matters.

EDIT: if backwards-compatibility is a concern, maybe add a new -D option equivalent to -d -w instead?