[lkml]   [2002]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH] sard changes for 2.5.34
    OK, that's a start.  I think there was some work done on making
kernel_stat percpu as well.

Yes there's work on a couple of different fronts there. There is work
to specifically make disk stats per cpu (actually, I have some 2.4
patches already I could port), and there is a more general interface
(statctr_t) which Dipankar Sarma ( is working on
for 2.5 for stat counters in general which generalizes the per-cpu

Regardless of which route we go, can you suggest a good exercise to
demonstrate the advantage of per-cpu counters? It seems intuitive to
me, but I'm much more comfortable when I have numbers to back me up.

Cleaning up and speeding up kernel_stat is a separate exercise of
course, but as we need to change userspace we may as well roll it
all up together.

That would be great ... but I want to be sure we don't take so long
working on the polish that we miss 10/31 with the main event. I can
spend a few days incorporating all of these things and repost, if you
don't think it makes it "too many changes at one time."

> a) all of it appear in /proc/stat?
> b) all of it appear in /proc/diskstats?
> c) keep the current (limited) info in /proc/stat (for backward
> compatibility) and introduce the expanded info in
> /proc/diskstats?

b). Let's get the kernel right and change userspace to follow. We
have another accounting patch which breaks top(1), so Rik has fixed
it (and is feeding the fixes upstream).

Easily done.

Does it work with the utilities at What is
the relationship with the 2.4 sard work? (I've never used sard, so
words of one syllable please ;))

The utilities won't without some minor changes. Those tools assume this
information appears in /proc/partitions, and that's a bad place for it
to appear. The tools would have to be updated to utilize
/proc/diskstats. Beyond that, the format is similar and the content is
similar. My guesstimate with a 3 minute look at iostat is it's less
than a day to modify the tools; possibly less than an hour.

This is a direct derivative of the 2.4 work. The work of collecting it
appears in the 2.4 tree already; the work of extracting it does not,
because Marcello has asked (smartly) that we do it first in 2.5 and then
backport to 2.4, so that the final interface is the same in each.

My understanding is that these are referred to as the "sard changes"
only because they provide the sort of information "sar -d" provided in
some unixes. There isn't a sar daemon running somewhere producing or
consuming this information.

The numbers in diskstats only increase. A tool like iostat can collect
the information from diskstats and do interesting things with it, like
provide just the delta from snapshot 1 and snapshot 2. (and 3, and 4,
and ..) and thus provide info like "# of write io's per 5 seconds".

If we can get this work playing nicely with those existing sard
tools, get the kernel_stat stuff cleaned up and get the relevant
userspace tools working and merged upstream then we have a neat
bundle to submit.

I think this is very doable.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.209 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site