Skip to contentSkip to conversation

What's the status on I/O-stats for dm block devices?

DISCUSSION Toon van der Pas 3 participants 4 messages Nov 22, 2005 – Dec 11, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi,

I'm running a newsserver with the newsspool on LVM2.
It's working great for years already. Thanks for the great software!

Question: Device mapper doesn't provide I/O-statistics yet. I found a bug in de Linux kernel bug tracker about this topic, with a patch from Kevin Corry. I added a comment to the bug report, asking about the status of the patch, and got a reply from Jens Axboe. He advised me to ask my question on this list.

See: http://bugme.osdl.org/show_bug.cgi?id=1806

Could anybody comment on Jens' reply, and tell me wether we can expect a solution? I can't imagine I'm the only one needing this...

Thanks.

#1 lore raw
Quoted 16 lines · Toon van der Pas

Hi,

I'm running a newsserver with the newsspool on LVM2.
It's working great for years already. Thanks for the great software!

Question: Device mapper doesn't provide I/O-statistics yet. I found a bug in de Linux kernel bug tracker about this topic, with a patch from Kevin Corry. I added a comment to the bug report, asking about the status of the patch, and got a reply from Jens Axboe. He advised me to ask my question on this list.

See: http://bugme.osdl.org/show_bug.cgi?id=1806

Could anybody comment on Jens' reply, and tell me wether we can expect a solution? I can't imagine I'm the only one needing this...

Quoted 8 lines

Thanks.

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

IIRC, there was a patch submitted recently to address this, so I'm assuming it will be released relatively soon. It looks somewhat like the patch you described above, just a little simpler. Thank you,

Josef

Signature · 4 lines
Josef Whiter, RHCE
Global Support Services
Red Hat, Inc.
919-754-3700 x44429
#2 lore raw
In reply to Toon van der Pas
Quoted 1 line · Toon van der Pas

See: http://bugme.osdl.org/show_bug.cgi?id=1806

I wasn't aware of that, but you'll see there's been some work on this recently:

http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/
dm-disk-statistics*

If people can test these patches and report back, I'm hoping to submit them for 2.5.16.

dm-disk-statistics-basic.patch
dm-disk-statistics-timing.patch

Additional patches for the latest -mm kernels:
dm-disk-statistics-basic-mm.patch
dm-disk-statistics-timing-mm.patch

There's also a more-sophisticated dm statistics target module on the way.

PS Another patch there people might like to play with is
dm-loop.patch
(I haven't reviewed it yet.)

I'm trying to work through the backlog of patches from various sources and add them to that tree so they can be cleaned up, tested and submitted upstream.

My plan is:
editing directory:
This is a copy of my working directory.
A low threshold for acceptance of patches here.
Some patches might never get any further.
As patches get closer to being ready for submission upstream they'll shuffle higher up the list in the 'series' file.
Some patches towards the bottom of the list might not even compile yet or might break things.
If you know of patches you'd like me to consider adding, please submit them (again) or send me a URL. (I still have a backlog after dealing with the LVM2 snapshot work, but patches that more people ask for are likely to get dealt with first.)

When I rebase to a new kernel, I'll archive the 'editing' directory under
a directory for the old kernel.

Periodically I'll issue snapshots of the directory as -dm kernels, like
we used to have -udm releases.

Note that any patches submitted now need to be accompanied by a 'Signed-Off-By' declaration as per Documentation/SubmittingPatches (section 11).

Alasdair

Signature · 1 line
[email protected]
#3 lore raw

Hi, I took the time today to compile an -mm kernel (2.6.15-rc5-mm1) and apply your patches...

Quoted 12 lines · Alasdair G Kergon
Quoted 1 line · Toon van der Pas

See: http://bugme.osdl.org/show_bug.cgi?id=1806

I wasn't aware of that, but you'll see there's been some work on this recently:

http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/
dm-disk-statistics*

If people can test these patches and report back, I'm hoping to submit them for 2.5.16.

Quoted 6 lines

dm-disk-statistics-basic.patch
dm-disk-statistics-timing.patch

Additional patches for the latest -mm kernels:
dm-disk-statistics-basic-mm.patch
dm-disk-statistics-timing-mm.patch

These patches applied with some fuzz.
The statistics seem to work now. These are the results.

*** Before the patch: ***

# cat /proc/diskstats | grep dm
 253    0 dm-0 0 0 0 0 0 0 0 0 0 0 0
 253    1 dm-1 0 0 0 0 0 0 0 0 0 0 0
 253    2 dm-2 0 0 0 0 0 0 0 0 0 0 0
 253    3 dm-3 0 0 0 0 0 0 0 0 0 0 0
 253    4 dm-4 0 0 0 0 0 0 0 0 0 0 0
 253    5 dm-5 0 0 0 0 0 0 0 0 0 0 0
 253    6 dm-6 0 0 0 0 0 0 0 0 0 0 0
# cat /sys/block/dm-*/stat
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0
       0        0        0        0        0        0        0        0        0        0        0

*** After the patch: ***

# cat /proc/diskstats | grep dm
 254    0 dm-0 1110 0 40394 11444 1 0 8 8 0 3480 11452
 254    1 dm-1 51 0 418 280 14 0 112 12 0 284 292
 254    2 dm-2 11 0 82 68 1 0 8 12 0 80 80
 254    3 dm-3 98 0 802 1064 381 0 3048 1872 0 1336 2936
 254    4 dm-4 26 0 202 120 88 0 704 280 1 144 400
 254    5 dm-5 1 0 8 12 0 0 0 0 0 12 12
 254    6 dm-6 0 0 0 0 0 0 0 0 0 0 0
# cat /sys/block/dm-*/stat
    1110        0    40394    11444        1        0        8        8        0     3480    11452
      51        0      418      280       14        0      112       12        0      284      292
      11        0       82       68        1        0        8       12        0       80       80
      98        0      802     1064      381        0     3048     1872        0     1336     2936
      25        0      194      120       80        0      640      280        0      144      400
       1        0        8       12        0        0        0        0        0       12       12
       0        0        0        0        0        0        0        0        0        0        0

I don't know what else to do.
Switched back to my regular gentoo-sources kernel. (the nvidia modules don't work with -mm kernels)

Why don't you submit these patches to Andrew Morton for inclusion in -mm? That way your patches would get much more exposure...

Thanks for device-mapper and LVM2!
Regards,
Toon.