diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-08 13:54:00 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-20 07:45:37 -0400 |
commit | edf1b879e308d37b5b7c414476ab39f79650a253 (patch) | |
tree | fec2895e806eb357ba9e9ed960f8c247042d5383 /block/blk-cgroup.h | |
parent | c4c76a05382c7d05e0b911daa58a827399e9ba1a (diff) |
blkcg: remove blkio_group->stats_lock
With recent plug merge updates, all non-percpu stat updates happen
under queue_lock making stats_lock unnecessary to synchronize stat
updates. The only synchronization necessary is stat reading, which
can be done using u64_stats_sync instead.
This patch removes blkio_group->stats_lock and adds
blkio_group_stats->syncp for reader synchronization.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 8bdcf504f94b..9df5ab04b6d6 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -119,6 +119,7 @@ struct blkio_cgroup { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | struct blkio_group_stats { | 121 | struct blkio_group_stats { |
122 | struct u64_stats_sync syncp; | ||
122 | /* total disk time and nr sectors dispatched by this group */ | 123 | /* total disk time and nr sectors dispatched by this group */ |
123 | uint64_t time; | 124 | uint64_t time; |
124 | uint64_t stat_arr[BLKIO_STAT_ARR_NR][BLKIO_STAT_TOTAL]; | 125 | uint64_t stat_arr[BLKIO_STAT_ARR_NR][BLKIO_STAT_TOTAL]; |
@@ -200,8 +201,6 @@ struct blkio_group { | |||
200 | /* reference count */ | 201 | /* reference count */ |
201 | int refcnt; | 202 | int refcnt; |
202 | 203 | ||
203 | /* Need to serialize the stats in the case of reset/update */ | ||
204 | spinlock_t stats_lock; | ||
205 | struct blkg_policy_data *pd[BLKIO_NR_POLICIES]; | 204 | struct blkg_policy_data *pd[BLKIO_NR_POLICIES]; |
206 | 205 | ||
207 | /* List of blkg waiting for per cpu stats memory to be allocated */ | 206 | /* List of blkg waiting for per cpu stats memory to be allocated */ |