CA-35192: Apply VBD QoS to tapdisk in the blktap case. Device I/O is issued by tapdisk, so ionice the tapdisk-pid instead of the kthread-pid. The key is maintained by blktapctrl and updated across process restarts. Signed-off-by: Daniel Stodden diff -r 2cdb37a98dbf ocaml/xenops/xal.ml --- a/ocaml/xenops/xal.ml Wed Nov 18 15:00:46 2009 -0800 +++ b/ocaml/xenops/xal.ml Wed Nov 18 16:40:42 2009 -0800 @@ -407,7 +407,8 @@ * The valid watch event have the following format : * 1 2 3 4 5 6 7 8 * /local/domain /0 /backend/ ///state - * /local/domain /0 /backend/ ///kthread-pid + * /local/domain /0 /backend/vbd ///kthread-pid + * /local/domain /0 /backend/tap ///tapdisk-pid * /local/domain /0 /backend/ ///shutdown-done * /local/domain /0 /backend/ ///type * /local/domain / /device / //state @@ -429,10 +430,17 @@ | "" :: "local" :: "domain" :: "0" :: "backend" :: ty :: domid :: devid :: [ "state" ] -> let xsds = read_state w in Some (int_of_string domid, Backend xsds, ty, devid) - | "" :: "local" :: "domain" :: "0" :: "backend" :: ty :: domid :: devid :: [ "kthread-pid" ] -> + | "" :: "local" :: "domain" :: "0" :: "backend" :: "vbd" :: domid :: devid :: [ "kthread-pid" ] -> begin try let kthread_pid = int_of_string (xs.Xs.read w) in - Some (int_of_string domid, BackThread kthread_pid, ty, devid) + Some (int_of_string domid, BackThread kthread_pid, "vbd", devid) + with _ -> + None + end + | "" :: "local" :: "domain" :: "0" :: "backend" :: "tap" :: domid :: devid :: [ "tapdisk-pid" ] -> + begin try + let tapdisk_pid = int_of_string (xs.Xs.read w) in + Some (int_of_string domid, BackThread tapdisk_pid, "tap", devid) with _ -> None end