Commit edf1b879 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

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: default avatarTejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c4c76a05
This diff is collapsed.
......@@ -119,6 +119,7 @@ struct blkio_cgroup {
};
struct blkio_group_stats {
struct u64_stats_sync syncp;
/* total disk time and nr sectors dispatched by this group */
uint64_t time;
uint64_t stat_arr[BLKIO_STAT_ARR_NR][BLKIO_STAT_TOTAL];
......@@ -200,8 +201,6 @@ struct blkio_group {
/* reference count */
int refcnt;
/* Need to serialize the stats in the case of reset/update */
spinlock_t stats_lock;
struct blkg_policy_data *pd[BLKIO_NR_POLICIES];
/* List of blkg waiting for per cpu stats memory to be allocated */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment