lkml.org 
[lkml]   [2003]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.6.0-test4 -- add context switch counters
On Tue, Aug 26, 2003 at 06:18:07PM -0700, Andrew Morton wrote:

> > always zero. The appended patch adds fields to struct task_struct to
> > count context switches, and adds code to do the counting.

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

I'm unaware of the cost of accounting this, but I for one have had
occasions where my system was reporting 20kcs, and I had no clue which
process was causing it. After a while I learned that linuxthreads on SMP can
cause this.

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

/proc/$$/stat would also be nice.

Thanks.

--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
-
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.119 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site