lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] 2.6.0-test4 -- add context switch counters
>>>>> "Andrew" == Andrew Morton <akpm@osdl.org> writes:

Andrew> Peter Chubb <peterc@gelato.unsw.edu.au> wrote:
>> Currently, the context switch counters reported by getrusage() are
>> always zero. The appended patch adds fields to struct task_struct
>> to count context switches, and adds code to do the counting.
>>
>> The patch adds 4 longs to struct task struct, and a single addition
>> to the fast path in schedule().

Andrew> OK... Why is this useful? A bit of googling doesn't show
Andrew> much interest in it.

/usr/bin/time reports the info, yes.

It's useful for tuning the scheduler, and when developing and tuning
posix thread apps.

I wanted to know if the work I did on adding preemption support to IA64
actually made much difference in the number of involuntary context
switches. It doesn't, at least on the measurements I've made so far.

I'm actually intested in getting most of the rusage fields filled in
properly, at least the ones that make sense for Linux.

Things to do are:
-- Track maxrss and report it.
-- Track and integrate rss.
-- Fix the page fault accounting (currently some minor faults
are counted as major faults)
-- add signal accounting

Block I/O isn't that important -- it almost all goes through the page
cache anyway, and it's a bit difficult to assign a particular I/O to a
particular process. Likewise, message I.O isn't that important AFAIK.

The stack, data and unshared data sizes aren't currently
accounted for separately at all, so it'd be a bit difficult to track
the integral of those numbers.

--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all slightly different.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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