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 if (type == BLKIO_STAT_SECTORS) 606 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 607 blkg->stats.sectors, cb, dev); 608 if (type == BLKIO_STAT_UNACCOUNTED_TIME) 609 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 610 blkg->stats.unaccounted_time, cb, dev); 611 - #ifdef CONFIG_DEBUG_BLK_CGROUP 612 if (type == BLKIO_STAT_AVG_QUEUE_SIZE) { 613 uint64_t sum = blkg->stats.avg_queue_size_sum; 614 uint64_t samples = blkg->stats.avg_queue_size_samples; ··· 1111 case BLKIO_PROP_sectors: 1112 return blkio_read_blkg_stats(blkcg, cft, cb, 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 case BLKIO_PROP_io_service_bytes: 1118 return blkio_read_blkg_stats(blkcg, cft, cb, 1119 BLKIO_STAT_SERVICE_BYTES, 1); ··· 1130 return blkio_read_blkg_stats(blkcg, cft, cb, 1131 BLKIO_STAT_QUEUED, 1); 1132 #ifdef CONFIG_DEBUG_BLK_CGROUP 1133 case BLKIO_PROP_dequeue: 1134 return blkio_read_blkg_stats(blkcg, cft, cb, 1135 BLKIO_STAT_DEQUEUE, 0); ··· 1270 .read_map = blkiocg_file_read_map, 1271 }, 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 .name = "io_service_bytes", 1280 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1281 BLKIO_PROP_io_service_bytes), ··· 1388 .name = "dequeue", 1389 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1390 BLKIO_PROP_dequeue), 1391 .read_map = blkiocg_file_read_map, 1392 }, 1393 #endif
··· 605 if (type == BLKIO_STAT_SECTORS) 606 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 607 blkg->stats.sectors, cb, dev); 608 + #ifdef CONFIG_DEBUG_BLK_CGROUP 609 if (type == BLKIO_STAT_UNACCOUNTED_TIME) 610 return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, 611 blkg->stats.unaccounted_time, cb, dev); 612 if (type == BLKIO_STAT_AVG_QUEUE_SIZE) { 613 uint64_t sum = blkg->stats.avg_queue_size_sum; 614 uint64_t samples = blkg->stats.avg_queue_size_samples; ··· 1111 case BLKIO_PROP_sectors: 1112 return blkio_read_blkg_stats(blkcg, cft, cb, 1113 BLKIO_STAT_SECTORS, 0); 1114 case BLKIO_PROP_io_service_bytes: 1115 return blkio_read_blkg_stats(blkcg, cft, cb, 1116 BLKIO_STAT_SERVICE_BYTES, 1); ··· 1133 return blkio_read_blkg_stats(blkcg, cft, cb, 1134 BLKIO_STAT_QUEUED, 1); 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); 1139 case BLKIO_PROP_dequeue: 1140 return blkio_read_blkg_stats(blkcg, cft, cb, 1141 BLKIO_STAT_DEQUEUE, 0); ··· 1270 .read_map = blkiocg_file_read_map, 1271 }, 1272 { 1273 .name = "io_service_bytes", 1274 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 1275 BLKIO_PROP_io_service_bytes), ··· 1394 .name = "dequeue", 1395 .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_PROP, 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), 1403 .read_map = blkiocg_file_read_map, 1404 }, 1405 #endif