Closed thomassa closed 10 years ago
@xen-git test this please
Looks good, @thomassa. I'd have recommended using the POSIX function setpriority [1] instead of forking out to nice to change the process priority, but it looks like the corresponding function to set IO priority is Linux-specific and doesn't have a glibc wrapper, so you have to jump through hoops and call it using syscall [2] [3]. While we could probably quickly whip up a ctypes binding to setpriority (or just use the one in ExtUnix [4]), it's probably not worth it since we I don't think we want to bother wrapping ioprio_set.
Other than that, the code is clean and well documented. Merge time!
[1] http://man7.org/linux/man-pages/man2/setpriority.2.html [2] http://man7.org/linux/man-pages/man2/ioprio_set.2.html [3] http://lxr.free-electrons.com/source/Documentation/block/ioprio.txt [4] http://extunix.forge.ocamlcore.org/api/ExtUnix.All.html
Signed-off-by: Thomas Sanders thomas.sanders@citrix.com