Re: [PATCH] 2.6.0-test4 -- add context switch counters

Andrew Morton
2003-08-27T01:15:13Z

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().

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

What apps should be reporting this info? /usr/bin/time?