4 ms·
One of the cases posited is `ps` or `top` which (on linux) read /proc/[0-9]+/stat and /proc/[0-9]+/cmdline, and in these cases it knows the the max it will want
by ploxiln 7y ago
One of the cases posited is `ps` or `top` which (on linux) read /proc/[0-9]+/stat and /proc/[0-9]+/cmdline, and in these cases it knows the the max it will want to read (which is pretty small, maybe 512 bytes at most). So this can make `ps` or `top` 3x faster / more efficient.
- bicolao 7y agoThere must be other use cases besides ps and top to justify new syscalls right? ps and top are not exactly slow to even make these optimizations visible.