linux-IllusionX/block
Tejun Heo 24bdb8ef06 blkcg: make blkcg_[rw]stat per-cpu
blkcg_[rw]stat are used as stat counters for blkcg policies.  It isn't
per-cpu by itself and blk-throttle makes it per-cpu by wrapping around
it.  This patch makes blkcg_[rw]stat per-cpu and drop the ad-hoc
per-cpu wrapping in blk-throttle.

* blkg_[rw]stat->cnt is replaced with cpu_cnt which is struct
  percpu_counter.  This makes syncp unnecessary as remote accesses are
  handled by percpu_counter itself.

* blkg_[rw]stat_init() can now fail due to percpu allocation failure
  and thus are updated to return int.

* percpu_counters need explicit freeing.  blkg_[rw]stat_exit() added.

* As blkg_rwstat->cpu_cnt[] can't be read directly anymore, reading
  and summing results are stored in ->aux_cnt[] instead.

* Custom per-cpu stat implementation in blk-throttle is removed.

This makes all blkcg stat counters per-cpu without complicating policy
implmentations.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-08-18 15:49:17 -07:00
..
partitions
bio-integrity.c bio integrity: do not assume bio_integrity_pool exists if bioset exists 2015-07-07 07:46:47 -06:00
bio.c block: Do a full clone when splitting discard bios 2015-07-23 16:21:34 -06:00
blk-cgroup.c blkcg: make blkcg_[rw]stat per-cpu 2015-08-18 15:49:17 -07:00
blk-core.c blkcg: consolidate blkg creation in blkcg_bio_issue_check() 2015-08-18 15:49:17 -07:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-iopoll.c
blk-lib.c
blk-map.c
blk-merge.c
blk-mq-cpu.c
blk-mq-cpumap.c
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq.c blk-mq: set default timeout as 30 seconds 2015-07-16 08:39:11 -06:00
blk-mq.h
blk-settings.c
blk-softirq.c
blk-sysfs.c
blk-tag.c
blk-throttle.c blkcg: make blkcg_[rw]stat per-cpu 2015-08-18 15:49:17 -07:00
blk-timeout.c
blk.h blkcg: consolidate blkg creation in blkcg_bio_issue_check() 2015-08-18 15:49:17 -07:00
bounce.c
bsg-lib.c
bsg.c
cfq-iosched.c blkcg: make blkcg_[rw]stat per-cpu 2015-08-18 15:49:17 -07:00
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c
ioprio.c
Kconfig
Kconfig.iosched
Makefile
noop-iosched.c
partition-generic.c
scsi_ioctl.c
t10-pi.c