From: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: [RFC][PATCH] iowait statistics
Date: Thu, 16 May 2002 08:58:46 -0200 [thread overview]
Message-ID: <200205160556.g4G5uEY15953@Port.imtp.ilyichevsk.odessa.ua> (raw)
In-Reply-To: <Pine.LNX.3.96.1020515111134.5026B-100000@gatekeeper.tmr.com>
On 15 May 2002 13:15, you wrote:
> On Wed, 15 May 2002, Denis Vlasenko wrote:
> > It can be fixed for SMP:
> > * add spinlock
> > or
> > * add per_cpu_idle, account it too at timer/APIC int
> > and get rid of idle % calculations for /proc/stat
> >
> > As a user, I vote for glitchless statistics even if they
> > consume extra i++ cycle every timer int on every CPU.
>
> You have pointed out the problem, but since your fix is UP only and
> doesn't have the iowait stuff, I think more of same is needed. I don't
> recall seeing this with preempt, but I am not a top user unless I'm
> looking for problems.
I just wanted to inform Rik of this small problem. Since he's going
to fiddle with stats, he can fix this on the way.
BTW, the bug is easily triggered on SMP kernel, very hard to see
(but definitely happens) with UP, I bet you'll see it on preempt too.
Try these two scripts:
#!/bin/sh
# Prints dots until bad thing happens
# Prints old_idle_cnt -> new_idle_cnt then
prev=0
while true; do cat /proc/stat; done | \
grep -F 'cpu ' | \
cut -d ' ' -f 6 | \
while read next; do
echo -n .
diff=$(($next-$prev))
if test $diff -lt 0; then
echo "$prev -> $next"
fi
prev=$next
done
#!/bin/sh
# Prints cpu line from /proc/stat repeatedly
# When bad thing happens, flags it by '<<<'
prev=0
while true; do cat /proc/stat; done | \
grep -F 'cpu ' | \
while read line; do
next=`echo "$line" | cut -d ' ' -f 6`
diff=$(($next-$prev))
if test $diff -lt 0; then
echo "$line <<<"
else
echo "$line"
fi
prev=$next
done
--
vda
next prev parent reply other threads:[~2002-05-16 6:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 1:19 [RFC][PATCH] iowait statistics Rik van Riel
2002-05-14 2:18 ` Andrew Morton
2002-05-14 12:30 ` Rik van Riel
2002-05-15 17:02 ` Denis Vlasenko
2002-05-16 7:41 ` Andrew Morton
2002-05-16 14:04 ` Denis Vlasenko
2002-05-14 15:39 ` William Lee Irwin III
2002-05-14 16:36 ` Rik van Riel
2002-05-14 16:54 ` William Lee Irwin III
2002-05-15 17:17 ` Denis Vlasenko
2002-05-15 14:03 ` Rik van Riel
2002-05-15 20:17 ` Denis Vlasenko
2002-05-15 16:13 ` Rik van Riel
2002-05-15 16:21 ` William Lee Irwin III
2002-05-15 17:00 ` William Lee Irwin III
2002-05-15 18:16 ` Bill Davidsen
2002-05-15 18:30 ` William Lee Irwin III
2002-05-15 18:33 ` Rik van Riel
2002-05-15 18:46 ` William Lee Irwin III
2002-05-15 19:00 ` Rik van Riel
2002-05-16 11:42 ` Denis Vlasenko
2002-05-16 11:14 ` Denis Vlasenko
2002-05-15 15:15 ` Bill Davidsen
2002-05-16 10:58 ` Denis Vlasenko [this message]
2002-05-14 18:19 ` Martin J. Bligh
2002-05-15 1:31 ` Bill Davidsen
2002-05-15 1:41 ` William Lee Irwin III
2002-05-15 14:39 ` Bill Davidsen
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=200205160556.g4G5uEY15953@Port.imtp.ilyichevsk.odessa.ua \
--to=vda@port.imtp.ilyichevsk.odessa.ua \
--cc=davidsen@tmr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
/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;
as well as URLs for NNTP newsgroup(s).