docker/libcontainer — pull request #167 by discordianfish (2014-08-27 11:51:56+00:00)
Title: Use blkio.throttle.* stats when CFQ is not in use

This makes blkio's GetStats try to read blkio.io_serviced_recursive
first and fall back to read the stats from blkio.throttle in case it
can't. blkio.io_serviced_recursive seems to be available across all
kernels with CFQ enabled.

This closes #165

nb: I've made actualStats a local variable in the tests. This was necessary because GetStats using the throttle stats won't touch the queue stats for example (since it doesn't have those metrics), so the actualStats in that particular test won't match the expected stats.
Let me know if I should explicitly set it nil but I don't think this is necessary.