From 3fd0b827811f53bba429a531247dd1c1290db2c1 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Thu, 19 May 2011 15:38:20 -0400 Subject: [PATCH] --- yaml --- r: 251150 b: refs/heads/master c: a23e68695593d00b35a6cddf8e9c9ec03505ecb9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/block/blk-cgroup.c | 2 ++ trunk/block/blk-cgroup.h | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 2cb7acaad5f5..04cdeb7c7c55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a29a171e7c46c60842b85729280e2f5690372683 +refs/heads/master: a23e68695593d00b35a6cddf8e9c9ec03505ecb9 diff --git a/trunk/block/blk-cgroup.c b/trunk/block/blk-cgroup.c index 471fdcc5df85..b0592bca6970 100644 --- a/trunk/block/blk-cgroup.c +++ b/trunk/block/blk-cgroup.c @@ -385,7 +385,9 @@ void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time, spin_lock_irqsave(&blkg->stats_lock, flags); blkg->stats.time += time; +#ifdef CONFIG_DEBUG_BLK_CGROUP blkg->stats.unaccounted_time += unaccounted_time; +#endif spin_unlock_irqrestore(&blkg->stats_lock, flags); } EXPORT_SYMBOL_GPL(blkiocg_update_timeslice_used); diff --git a/trunk/block/blk-cgroup.h b/trunk/block/blk-cgroup.h index c774930cc206..63f1ef4450d7 100644 --- a/trunk/block/blk-cgroup.h +++ b/trunk/block/blk-cgroup.h @@ -49,9 +49,9 @@ enum stat_type { /* All the single valued stats go below this */ BLKIO_STAT_TIME, BLKIO_STAT_SECTORS, +#ifdef CONFIG_DEBUG_BLK_CGROUP /* Time not charged to this cgroup */ BLKIO_STAT_UNACCOUNTED_TIME, -#ifdef CONFIG_DEBUG_BLK_CGROUP BLKIO_STAT_AVG_QUEUE_SIZE, BLKIO_STAT_IDLE_TIME, BLKIO_STAT_EMPTY_TIME, @@ -117,10 +117,11 @@ struct blkio_group_stats { /* total disk time and nr sectors dispatched by this group */ uint64_t time; uint64_t sectors; - /* Time not charged to this cgroup */ - uint64_t unaccounted_time; uint64_t stat_arr[BLKIO_STAT_QUEUED + 1][BLKIO_STAT_TOTAL]; #ifdef CONFIG_DEBUG_BLK_CGROUP + /* Time not charged to this cgroup */ + uint64_t unaccounted_time; + /* Sum of number of IOs queued across all samples */ uint64_t avg_queue_size_sum; /* Count of samples taken for average */