blk-throttle: Make dispatch stats per cpu
authorVivek Goyal <vgoyal@redhat.com>
Thu, 19 May 2011 19:38:28 +0000 (15:38 -0400)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 20 May 2011 18:34:52 +0000 (20:34 +0200)
commit5624a4e445e2ec27582984b068d7bf7f127cee10
tree0827c83c6e5f5fa83bd0dadc1bc395c0f0657dae
parent4843c69d496a8d2e4caab6182fe016b9a79136e0
blk-throttle: Make dispatch stats per cpu

Currently we take blkg_stat lock for even updating the stats. So even if
a group has no throttling rules (common case for root group), we end
up taking blkg_lock, for updating the stats.

Make dispatch stats per cpu so that these can be updated without taking
blkg lock.

If cpu goes offline, these stats simply disappear. No protection has
been provided for that yet. Do we really need anything for that?

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-cgroup.c
block/blk-cgroup.h
block/blk-throttle.c
block/cfq-iosched.c