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 <daniel.stodden@xxxxxxxxxx>
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/<type> /<domid>/<devid>/state
- * /local/domain /0 /backend/<type> /<domid>/<devid>/kthread-pid
+ * /local/domain /0 /backend/vbd /<domid>/<devid>/kthread-pid
+ * /local/domain /0 /backend/tap /<domid>/<devid>/tapdisk-pid
* /local/domain /0 /backend/<type> /<domid>/<devid>/shutdown-done
* /local/domain /0 /backend/<type> /<domid>/<devid>/type
* /local/domain /<domid> /device /<type> /<devid>/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
CA-35192-tapdisk-pid.diff
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|