Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a23e6869 authored by Vivek Goyal's avatar Vivek Goyal Committed by Jens Axboe
Browse files

blk-cgroup: move some fields of unaccounted_time file under right config option



cgroup unaccounted_time file is created only if CONFIG_DEBUG_BLK_CGROUP=y.
there are some fields which are out side this config option. Fix that.

Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent a29a171e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -385,7 +385,9 @@ void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time,


	spin_lock_irqsave(&blkg->stats_lock, flags);
	spin_lock_irqsave(&blkg->stats_lock, flags);
	blkg->stats.time += time;
	blkg->stats.time += time;
#ifdef CONFIG_DEBUG_BLK_CGROUP
	blkg->stats.unaccounted_time += unaccounted_time;
	blkg->stats.unaccounted_time += unaccounted_time;
#endif
	spin_unlock_irqrestore(&blkg->stats_lock, flags);
	spin_unlock_irqrestore(&blkg->stats_lock, flags);
}
}
EXPORT_SYMBOL_GPL(blkiocg_update_timeslice_used);
EXPORT_SYMBOL_GPL(blkiocg_update_timeslice_used);
+4 −3
Original line number Original line Diff line number Diff line
@@ -49,9 +49,9 @@ enum stat_type {
	/* All the single valued stats go below this */
	/* All the single valued stats go below this */
	BLKIO_STAT_TIME,
	BLKIO_STAT_TIME,
	BLKIO_STAT_SECTORS,
	BLKIO_STAT_SECTORS,
#ifdef CONFIG_DEBUG_BLK_CGROUP
	/* Time not charged to this cgroup */
	/* Time not charged to this cgroup */
	BLKIO_STAT_UNACCOUNTED_TIME,
	BLKIO_STAT_UNACCOUNTED_TIME,
#ifdef CONFIG_DEBUG_BLK_CGROUP
	BLKIO_STAT_AVG_QUEUE_SIZE,
	BLKIO_STAT_AVG_QUEUE_SIZE,
	BLKIO_STAT_IDLE_TIME,
	BLKIO_STAT_IDLE_TIME,
	BLKIO_STAT_EMPTY_TIME,
	BLKIO_STAT_EMPTY_TIME,
@@ -117,10 +117,11 @@ struct blkio_group_stats {
	/* total disk time and nr sectors dispatched by this group */
	/* total disk time and nr sectors dispatched by this group */
	uint64_t time;
	uint64_t time;
	uint64_t sectors;
	uint64_t sectors;
	/* Time not charged to this cgroup */
	uint64_t unaccounted_time;
	uint64_t stat_arr[BLKIO_STAT_QUEUED + 1][BLKIO_STAT_TOTAL];
	uint64_t stat_arr[BLKIO_STAT_QUEUED + 1][BLKIO_STAT_TOTAL];
#ifdef CONFIG_DEBUG_BLK_CGROUP
#ifdef CONFIG_DEBUG_BLK_CGROUP
	/* Time not charged to this cgroup */
	uint64_t unaccounted_time;

	/* Sum of number of IOs queued across all samples */
	/* Sum of number of IOs queued across all samples */
	uint64_t avg_queue_size_sum;
	uint64_t avg_queue_size_sum;
	/* Count of samples taken for average */
	/* Count of samples taken for average */