From 575969a0dd3fe65c6556bcb8f87c42303326ea55 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 19 May 2011 15:38:29 -0400 Subject: blk-cgroup: Make 64bit per cpu stats safe on 32bit arch Some of the stats are 64bit and updation will be non atomic on 32bit architecture. Use sequence counters on 32bit arch to make reading of stats safe. Signed-off-by: Vivek Goyal Signed-off-by: Jens Axboe --- block/blk-cgroup.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block/blk-cgroup.h') diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index fd730a2..2622267 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -14,6 +14,7 @@ */ #include +#include enum blkio_policy_id { BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */ @@ -154,6 +155,7 @@ struct blkio_group_stats { struct blkio_group_stats_cpu { uint64_t sectors; uint64_t stat_arr_cpu[BLKIO_STAT_CPU_NR][BLKIO_STAT_TOTAL]; + struct u64_stats_sync syncp; }; struct blkio_group { -- cgit v1.1