lkml.org 
[lkml]   [2002]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [RFC][PATCH] iowait statistics
Date
On 15 May 2002 14:13, Rik van Riel wrote:
> On Wed, 15 May 2002, Denis Vlasenko wrote:
> > I think two patches for same kernel piece at the same time is
> > too many. Go ahead and code this if you want.
>
> OK, here it is. Changes against yesterday's patch:
>
> 1) make sure idle time can never go backwards by incrementing
> the idle time in the timer interrupt too (surely we can
> take this overhead if we're idle anyway ;))
>
> 2) get_request_wait also raises nr_iowait_tasks (thanks akpm)
>
> This patch is against the latest 2.5 kernel from bk and
> pretty much untested. If you have the time, please test
> it and let me know if it works.


--- 1.73/kernel/sched.c Mon Apr 29 09:16:24 2002
+++ edited/kernel/sched.c Wed May 15 12:58:18 2002
@@ -679,6 +679,10 @@
if (p == rq->idle) {
[*]
if (local_bh_count(cpu) || local_irq_count(cpu) > 1)
kstat.per_cpu_system[cpu] += system;
+ else if (atomic_read(&nr_iowait_tasks) > 0)
+ kstat.per_cpu_iowait[cpu] += system;
+ else
+ kstat.per_cpu_idle[cpu] += system;

[*] Maybe add if(system!=0) there?
--
vda
-
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:26    [W:0.081 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site