diff options
| author | Divyesh Shah <dpshah@google.com> | 2010-04-09 02:31:19 -0400 |
|---|---|---|
| committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-09 02:31:19 -0400 |
| commit | 84c124da9ff50bd71fab9c939ee5b7cd8bef2bd9 (patch) | |
| tree | f94ad03b56c71ebbe6b92265054c5e24af25b869 /Documentation/cgroups | |
| parent | 31373d09da5b7fe21fe6f781e92bd534a3495f00 (diff) | |
blkio: Changes to IO controller additional stats patches
that include some minor fixes and addresses all comments.
Changelog: (most based on Vivek Goyal's comments)
o renamed blkiocg_reset_write to blkiocg_reset_stats
o more clarification in the documentation on io_service_time and io_wait_time
o Initialize blkg->stats_lock
o rename io_add_stat to blkio_add_stat and declare it static
o use bool for direction and sync
o derive direction and sync info from existing rq methods
o use 12 for major:minor string length
o define io_service_time better to cover the NCQ case
o add a separate reset_stats interface
o make the indexed stats a 2d array to simplify macro and function pointer code
o blkio.time now exports in jiffies as before
o Added stats description in patch description and
Documentation/cgroup/blkio-controller.txt
o Prefix all stats functions with blkio and make them static as applicable
o replace IO_TYPE_MAX with IO_TYPE_TOTAL
o Moved #define constant to top of blk-cgroup.c
o Pass dev_t around instead of char *
o Add note to documentation file about resetting stats
o use BLK_CGROUP_MODULE in addition to BLK_CGROUP config option in #ifdef
statements
o Avoid struct request specific knowledge in blk-cgroup. blk-cgroup.h now has
rq_direction() and rq_sync() functions which are used by CFQ and when using
io-controller at a higher level, bio_* functions can be added.
Signed-off-by: Divyesh Shah<dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'Documentation/cgroups')
| -rw-r--r-- | Documentation/cgroups/blkio-controller.txt | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index 630879cd9a42..ed04fe9cce1a 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt | |||
| @@ -77,7 +77,6 @@ Details of cgroup files | |||
| 77 | ======================= | 77 | ======================= |
| 78 | - blkio.weight | 78 | - blkio.weight |
| 79 | - Specifies per cgroup weight. | 79 | - Specifies per cgroup weight. |
| 80 | |||
| 81 | Currently allowed range of weights is from 100 to 1000. | 80 | Currently allowed range of weights is from 100 to 1000. |
| 82 | 81 | ||
| 83 | - blkio.time | 82 | - blkio.time |
| @@ -92,6 +91,49 @@ Details of cgroup files | |||
| 92 | third field specifies the number of sectors transferred by the | 91 | third field specifies the number of sectors transferred by the |
| 93 | group to/from the device. | 92 | group to/from the device. |
| 94 | 93 | ||
| 94 | - blkio.io_service_bytes | ||
| 95 | - Number of bytes transferred to/from the disk by the group. These | ||
| 96 | are further divided by the type of operation - read or write, sync | ||
| 97 | or async. First two fields specify the major and minor number of the | ||
| 98 | device, third field specifies the operation type and the fourth field | ||
| 99 | specifies the number of bytes. | ||
| 100 | |||
| 101 | - blkio.io_serviced | ||
| 102 | - Number of IOs completed to/from the disk by the group. These | ||
| 103 | are further divided by the type of operation - read or write, sync | ||
| 104 | or async. First two fields specify the major and minor number of the | ||
| 105 | device, third field specifies the operation type and the fourth field | ||
| 106 | specifies the number of IOs. | ||
| 107 | |||
| 108 | - blkio.io_service_time | ||
| 109 | - Total amount of time between request dispatch and request completion | ||
| 110 | for the IOs done by this cgroup. This is in nanoseconds to make it | ||
| 111 | meaningful for flash devices too. For devices with queue depth of 1, | ||
| 112 | this time represents the actual service time. When queue_depth > 1, | ||
| 113 | that is no longer true as requests may be served out of order. This | ||
| 114 | may cause the service time for a given IO to include the service time | ||
| 115 | of multiple IOs when served out of order which may result in total | ||
| 116 | io_service_time > actual time elapsed. This time is further divided by | ||
| 117 | the type of operation - read or write, sync or async. First two fields | ||
| 118 | specify the major and minor number of the device, third field | ||
| 119 | specifies the operation type and the fourth field specifies the | ||
| 120 | io_service_time in ns. | ||
| 121 | |||
| 122 | - blkio.io_wait_time | ||
| 123 | - Total amount of time the IOs for this cgroup spent waiting in the | ||
| 124 | scheduler queues for service. This can be greater than the total time | ||
| 125 | elapsed since it is cumulative io_wait_time for all IOs. It is not a | ||
| 126 | measure of total time the cgroup spent waiting but rather a measure of | ||
| 127 | the wait_time for its individual IOs. For devices with queue_depth > 1 | ||
| 128 | this metric does not include the time spent waiting for service once | ||
| 129 | the IO is dispatched to the device but till it actually gets serviced | ||
| 130 | (there might be a time lag here due to re-ordering of requests by the | ||
| 131 | device). This is in nanoseconds to make it meaningful for flash | ||
| 132 | devices too. This time is further divided by the type of operation - | ||
| 133 | read or write, sync or async. First two fields specify the major and | ||
| 134 | minor number of the device, third field specifies the operation type | ||
| 135 | and the fourth field specifies the io_wait_time in ns. | ||
| 136 | |||
| 95 | - blkio.dequeue | 137 | - blkio.dequeue |
| 96 | - Debugging aid only enabled if CONFIG_DEBUG_CFQ_IOSCHED=y. This | 138 | - Debugging aid only enabled if CONFIG_DEBUG_CFQ_IOSCHED=y. This |
| 97 | gives the statistics about how many a times a group was dequeued | 139 | gives the statistics about how many a times a group was dequeued |
| @@ -99,6 +141,10 @@ Details of cgroup files | |||
| 99 | and minor number of the device and third field specifies the number | 141 | and minor number of the device and third field specifies the number |
| 100 | of times a group was dequeued from a particular device. | 142 | of times a group was dequeued from a particular device. |
| 101 | 143 | ||
| 144 | - blkio.reset_stats | ||
| 145 | - Writing an int to this file will result in resetting all the stats | ||
| 146 | for that cgroup. | ||
| 147 | |||
| 102 | CFQ sysfs tunable | 148 | CFQ sysfs tunable |
| 103 | ================= | 149 | ================= |
| 104 | /sys/block/<disk>/queue/iosched/group_isolation | 150 | /sys/block/<disk>/queue/iosched/group_isolation |
