blk-cgroup: Only give unaccounted_time under debug

This change moves unaccounted_time to only be reported when
CONFIG_DEBUG_BLK_CGROUP is true.

Signed-off-by: Justin TerAvest <teravest@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

authored by Justin TerAvest and committed by Jens Axboe 9026e521 eda5e0c9

+10 -10
+10 -10
block/blk-cgroup.c
··· 605 605 if (type == BLKIO_STAT_SECTORS) 606 606 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 607 607 blkg->stats.sectors, cb, dev); 608 + #ifdef CONFIG_DEBUG_BLK_CGROUP 608 609 if (type == BLKIO_STAT_UNACCOUNTED_TIME) 609 610 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 610 611 blkg->stats.unaccounted_time, cb, dev); 611 - #ifdef CONFIG_DEBUG_BLK_CGROUP 612 612 if (type == BLKIO_STAT_AVG_QUEUE_SIZE) { 613 613 uint64_t sum = blkg->stats.avg_queue_size_sum; 614 614 uint64_t samples = blkg->stats.avg_queue_size_samples; ··· 1111 1111 case BLKIO_PROP_sectors: 1112 1112 return blkio_read_blkg_stats(blkcg, cft, cb, 1113 1113 BLKIO_STAT_SECTORS, 0); 1114 - case BLKIO_PROP_unaccounted_time: 1115 - return blkio_read_blkg_stats(blkcg, cft, cb, 1116 - BLKIO_STAT_UNACCOUNTED_TIME, 0); 1117 1114 case BLKIO_PROP_io_service_bytes: 1118 1115 return blkio_read_blkg_stats(blkcg, cft, cb, 1119 1116 BLKIO_STAT_SERVICE_BYTES, 1); ··· 1130 1133 return blkio_read_blkg_stats(blkcg, cft, cb, 1131 1134 BLKIO_STAT_QUEUED, 1); 1132 1135 #ifdef CONFIG_DEBUG_BLK_CGROUP 1136 + case BLKIO_PROP_unaccounted_time: 1137 + return blkio_read_blkg_stats(blkcg, cft, cb, 1138 + BLKIO_STAT_UNACCOUNTED_TIME, 0); 1133 1139 case BLKIO_PROP_dequeue: 1134 1140 return blkio_read_blkg_stats(blkcg, cft, cb, 1135 1141 BLKIO_STAT_DEQUEUE, 0); ··· 1270 1270 .read_map = blkiocg_file_read_map, 1271 1271 }, 1272 1272 { 1273 - .name = "unaccounted_time", 1274 - .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1275 - BLKIO_PROP_unaccounted_time), 1276 - .read_map = blkiocg_file_read_map, 1277 - }, 1278 - { 1279 1273 .name = "io_service_bytes", 1280 1274 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1281 1275 BLKIO_PROP_io_service_bytes), ··· 1388 1394 .name = "dequeue", 1389 1395 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1390 1396 BLKIO_PROP_dequeue), 1397 + .read_map = blkiocg_file_read_map, 1398 + }, 1399 + { 1400 + .name = "unaccounted_time", 1401 + .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1402 + BLKIO_PROP_unaccounted_time), 1391 1403 .read_map = blkiocg_file_read_map, 1392 1404 }, 1393 1405 #endif