From: William Lee Irwin III <wli@holomorphy.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC][PATCH] iowait statistics
Date: Tue, 14 May 2002 08:39:56 -0700 [thread overview]
Message-ID: <20020514153956.GI15756@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.44L.0205132214480.32261-100000@imladris.surriel.com>
On Mon, May 13, 2002 at 10:19:26PM -0300, Rik van Riel wrote:
> 2) if no process is running, the timer interrupt adds a jiffy
> to the iowait time
[...]
> 4) on SMP systems the iowait time can be overestimated, no big
> deal IMHO but cheap suggestions for improvement are welcome
This appears to be global across all cpu's. Maybe nr_iowait_tasks
should be accounted on a per-cpu basis, where
(1) If a task sleeps for an io while bound to a cpu it
counts toward the cpu's number of iowait tasks.
(2) iowait time is accounted and reports are generated already
on a per-cpu basis, so there's nothing to do there.
(3) The global statistic does not need to be entirely accurate;
a lockfree approximation by summing across all cpus'
local counters should suffice for global iowait. I also
suspect it will not fluctuate rapidly enough for truly
horribly inaccurate results to occur.
(4) A per-cpu nr_iowait_tasks counter may still well need
to be atomic as other cpu's may be stealing sleeping
tasks purportedly bound to a given cpu at migration
time (in order to prevent going negative) and in that
process altering other cpus' counters.
(5) A flag marking a task as in iowait may well need to be kept
in the task_struct so that at migration time the
appropriate counter adjustments can be made.
(6) Given sufficient cpu affinity in the scheduler the case
where one cpu's counter needs alteration from another
should be relatively uncommon.
The scheduler already participates in keeping per_cpu_user[],
per_cpu_system[], and per_cpu_nice[] up-to-date, so it's not
unreasonable to expect its support for per_cpu_iowait[].
Cheers,
Bill
--
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-14 15:39 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 [this message]
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
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=20020514153956.GI15756@holomorphy.com \
--to=wli@holomorphy.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