History

dm: add statistics support

Support the collection of I/O statistics on user-defined regions of a DM device. If no regions are defined no statistics are collected so there isn't any performance impact. Only bio-based DM devices are currently supported. Each user-defined region specifies a starting sector, length and step. Individual statistics will be collected for each step-sized area within the range specified. The I/O statistics counters for each step-sized area of a region are in the same format as /sys/block/*/stat or /proc/diskstats but extra counters (12 and 13) are provided: total time spent reading and writing in milliseconds. All these counters may be accessed by sending the @stats_print message to the appropriate DM device via dmsetup. The creation of DM statistics will allocate memory via kmalloc or fallback to using vmalloc space. At most, 1/4 of the overall system memory may be allocated by DM statistics. The admin can see how much memory is used by reading /sys/module/dm_mod/parameters/stats_current_allocated_bytes See Documentation/device-mapper/statistics.txt for more details.

Mikulas Patocka committed 13 years ago

Commit fd2ed4d1 parent 94563ba9 files · +1299 −14Browse files

Showing the changes to include/uapi/linux (1 of 9 files). Show all

Unified · Split

include/uapi/linux/dm-ioctl.h+2−2
@@ -267,9 +267,9 @@ enum { · 266 unmodified lines
267267 #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
268268
269269 #define DM_VERSION_MAJOR 4
270−#define DM_VERSION_MINOR 25
270+#define DM_VERSION_MINOR 26
271271 #define DM_VERSION_PATCHLEVEL 0
272−#define DM_VERSION_EXTRA "-ioctl (2013-06-26)"
272+#define DM_VERSION_EXTRA "-ioctl (2013-08-15)"
273273
274274 /* Status bits */
275275 #define DM_READONLY_FLAG (1 << 0) /* In/Out */