Skip to content

Enhanced partition statistics

Jerome Marchand lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Enhanced partition statistics: core statisticsinclude/linux/genhd.h+131 -11 reply
2/6Enhanced partition statistics: update partition statiticsblock/blk-core.c block/blk-merge.c fs/partitions/check.c +1 more+44 -40 replies
3/6Enhanced partition statistics: aoe fixdrivers/block/aoe/aoecmd.c+4 -40 replies
4/6Enhanced partition statistics: sysfsfs/partitions/check.c+19 -30 replies
5/6Enhanced partition statistics: procfsblock/genhd.c+22 -60 replies
6/6Enhanced partition statistics: remove old partition statisticsblock/blk-core.c fs/partitions/check.c include/linux/genhd.h+0 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Patch 0/6] Enhanced partition statistics

Hi,

This patchset is the corrected version of the patchset I posted here weeks ago and which brings back the I/O statistics concerning partitions which were lost between 2.4 and 2.6 kernels.

This version still breaks the /sys/block/_disk_/_part_/stat and /proc/diskstats interfaces. Incidentally iostat is already able to deal correctly with the new format and both 'iostat -x' and 'iostat -p' already display the enhanced partition statistics.

Adding new information at the end of the line as suggested by Randy, would also break some user space applications. For example, iostat which relies on the number of fields to make the difference between devices and partitions would not work anymore. Moreover it would would be inconsistent and confusing to display the same statistics in a different order depending on whether they are related to a device or a partition.

I do really think that the current interface is confusing and that user space programs use it improperly. For example, the output of 'iostat -p' is not consistent: the reported tps (tranfers/s) value of a device and the sum of his partitions are completely dissimillar because iostat handle in the same manner pre-merge and after-merge statistics.

'iostat -p' output without Enhanced Partition Statistics:
[root@xxx tmp]# iostat -p
Linux 2.6.24-orig (xxx) 02/01/2008

avg-cpu: %user %nice %system %iowait %steal %idle

           0.37    0.00    0.25    0.82    0.00   98.56

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn

cciss/c0d0        3.12       161.00        18.41     299182      34220
cciss/c0d0p1      1.05         2.10         0.00       3906          4
cciss/c0d0p2      6.67       158.77        18.41     295044      34216
cciss/c0d1        0.16         3.16         0.00       5864          0
cciss/c0d1p1      0.14         0.33         0.00        620          0
cciss/c0d1p2      2.21         2.23         0.00       4148          0
dm-0              6.51       158.56        18.41     294650      34216
dm-1              0.00         0.01         0.00         24          0

'iostat -p' output with Enhanced Partition Statistics:
[root@xxx tmp]# iostat -p
Linux 2.6.24-eps (xxx) 02/01/2008

avg-cpu: %user %nice %system %iowait %steal %idle

           0.05    0.00    0.09    0.91    0.00   98.95

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn

cciss/c0d0        3.15        18.55       136.56     345862    2546140
cciss/c0d0p1      0.01         0.21         0.00       3914          4
cciss/c0d0p2      3.14        18.33       136.56     341724    2546136
cciss/c0d1        0.02         0.31         0.00       5864          0
cciss/c0d1p1      0.01         0.05         0.00       1012          0
cciss/c0d1p2      0.01         0.22         0.00       4148          0

dm-0 17.58 18.31 136.56 341330 2546136
dm-1 0.00 0.00 0.00 24 0

Any comments ?

Regards,
Jerome Marchand