From: Jens Axboe <axboe@suse.de>
To: Leigh Brown <leigh@solinno.co.uk>
Cc: riel@conectiva.com.br, linux-mm@kvack.org
Subject: Re: [RFC][PATCH] iowait statistics
Date: Fri, 17 May 2002 10:02:07 +0200 [thread overview]
Message-ID: <20020517080207.GC1109@suse.de> (raw)
In-Reply-To: <32781.194.247.51.251.1021567466.squirrel@lbbrown.homeip.net>
On Thu, May 16 2002, Leigh Brown wrote:
> Today, Rik van Riel wrote:
> > On Thu, 16 May 2002, Leigh Brown wrote:
> >
> >> I've tried this patch against Red Hat's 2.4.18 kernel on my laptop,
> >> and patched top to display the results. It certainly seems to be
> >> working correctly running a few little contrived tests.
> >
> > Cool, could you please post the patch to top so other people
> > can enjoy it too ? ;)
>
> I'd call it a hack rather than a patch. I might be able to look at
> it later.
>
> [...]
> >> CPU states: 0.3% user, 8.9% system, 0.0% nice, 77.2% idle, 13.3%
> >> wait
> >>
> >> I'm not sure if that can be explained by the way the raw I/O stuff
> >> works, or because I'm running it against 2.4. Anyway, overall it's
> >> looking good.
> >
> > Most likely the patch forgets to increment nr_iowait_tasks in
> > some raw IO code path...
>
> Ah yes, could this be it? It makes the output look right:
>
> --- linux-2.4.18-3/fs/iobuf.c Fri Apr 27 22:23:25 2001
> +++ linux-2.4.18-5/fs/iobuf.c Thu May 16 16:07:32 2002
> @@ -136,7 +136,9 @@
> set_task_state(tsk, TASK_UNINTERRUPTIBLE);
> if (atomic_read(&kiobuf->io_count) != 0) {
>
> run_task_queue(&tq_disk);
> +
> atomic_inc(&nr_iowait_tasks);
>
> schedule();
> +
> atomic_dec(&nr_iowait_tasks);
>
> if (atomic_read(&kiobuf->io_count) != 0)
>
> goto repeat;
> }
Would it not be easier to simply have the paths which are waiting for
I/O completion to signal that?
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_IOWAIT);
and have schedule() inc and dec nr_iowait_tasks for us.
--
Jens Axboe
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next prev parent reply other threads:[~2002-05-17 8:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 1:19 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-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 9:49 ` Leigh Brown
2002-05-16 14:51 ` Rik van Riel
2002-05-16 16:44 ` Leigh Brown
2002-05-17 8:02 ` Jens Axboe [this message]
2002-05-16 11:14 ` Denis Vlasenko
2002-05-15 15:15 ` Bill Davidsen
2002-05-16 10:58 ` Denis Vlasenko
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=20020517080207.GC1109@suse.de \
--to=axboe@suse.de \
--cc=leigh@solinno.co.uk \
--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