From: David Wragg <david@wragg.org>
To: Benjamin LaHaise <bcrl@kvack.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] procfs: export context switch counts in /proc/*/stat
Date: Tue, 19 Dec 2006 11:47:06 +0000 [thread overview]
Message-ID: <87fybc9kg5.fsf@wragg.org> (raw)
In-Reply-To: <20061219063955.GN1104@kvack.org> (Benjamin LaHaise's message of "Tue\, 19 Dec 2006 01\:39\:55 -0500")
Benjamin LaHaise <bcrl@kvack.org> writes:
> On Mon, Dec 18, 2006 at 11:50:08PM +0000, David Wragg wrote:
>> This patch (against 2.6.19/2.6.19.1) adds the four context switch
>> values (voluntary context switches, involuntary context switches, and
>> the same values accumulated from terminated child processes) to the
>> end of /proc/*/stat, similarly to min_flt, maj_flt and the time used
>> values.
>
> Please put these into new files, as the stat files in /proc are
> horribly overloaded and have always been somewhat problematic
> when it comes to changing how things are reported due to internal
> changes to the kernel. Cheers,
The delay accounting value was added to the end of /proc/pid/stat back
in July without discussion, so I assumed this approach was still
considered satisfactory.
Putting just these four values into a new file would seem a little
odd, since they have a lot in common with the other getrusage values
that are already in /proc/pid/stat. One possibility is to add
/proc/pid/rusage, mirroring the full struct rusage in text form, since
struct rusage is already part of the kernel ABI (though Linux doesn't
fill in half of the values).
Or perhaps it makes sense to reorganize all the values from
/proc/pid/stat and its siblings into a sysfs-like one-value-per-file
structure, though that might introduce atomicity and efficiency issues
(calculating some of the values involves iterating over the threads in
the process; with everything in one file, these loops are folded
together).
Any thoughts?
David
next prev parent reply other threads:[~2006-12-19 11:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-18 23:50 [PATCH] procfs: export context switch counts in /proc/*/stat David Wragg
2006-12-19 6:39 ` Benjamin LaHaise
2006-12-19 11:47 ` David Wragg [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-20 5:40 Albert Cahalan
2006-12-20 13:20 ` David Wragg
2006-12-20 13:48 ` Arjan van de Ven
2006-12-20 14:38 ` David Wragg
2006-12-20 14:51 ` Arjan van de Ven
2006-12-20 15:13 ` David Wragg
2006-12-20 17:36 ` Albert Cahalan
2006-12-24 1:40 ` David Wragg
2006-12-21 6:02 Al Boldi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fybc9kg5.fsf@wragg.org \
--to=david@wragg.org \
--cc=bcrl@kvack.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox