Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1416041 > unrolled thread
| Started by | Cao jin <caoj.fnst@cn.fujitsu.com> |
|---|---|
| First post | 2016-06-07 13:20 +0200 |
| Last post | 2016-06-08 09:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
about definition of iowait Cao jin <caoj.fnst@cn.fujitsu.com> - 2016-06-07 13:20 +0200
Re: about definition of iowait Peter Zijlstra <peterz@infradead.org> - 2016-06-07 14:10 +0200
Re: about definition of iowait Cao jin <caoj.fnst@cn.fujitsu.com> - 2016-06-08 09:10 +0200
| From | Cao jin <caoj.fnst@cn.fujitsu.com> |
|---|---|
| Date | 2016-06-07 13:20 +0200 |
| Subject | about definition of iowait |
| Message-ID | <rHnd9-1YN-49@gated-at.bofh.it> |
Hi, I noticed some problems about iowait entry of /proc/stat: it seems not accurate, and sometimes will decrease in SMP. For UP, we have a simple definition about iowait, which is: The time that the processor is idle, during which there is a task waiting for I/O. This definition seems don't fit well when step into SMP era, so I think maybe it can be extended like: For a given CPU, the I/O wait time is the time during which that CPU was idle, and there is at least one outstanding disk I/O operation requested by a task scheduled on that CPU. But tasks can migrate among cpus, so this definition maybe not accurate. I also saw some suggestions that it should be a global value, not per cpu, but don`t see clear definition, so anyone have suggestions about it? (personally guessing, maybe: there is task waiting for outstanding I/O while all cpus are idle? But I don't think it is good...) -- Yours Sincerely, Cao jin
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-06-07 14:10 +0200 |
| Message-ID | <rHnZv-2wN-11@gated-at.bofh.it> |
| In reply to | #1416041 |
On Tue, Jun 07, 2016 at 07:24:46PM +0800, Cao jin wrote: > Hi, > > I noticed some problems about iowait entry of /proc/stat: it seems not > accurate, and sometimes will decrease in SMP. > > For UP, we have a simple definition about iowait, which is: > The time that the processor is idle, during which there is a task waiting > for I/O. > > This definition seems don't fit well when step into SMP era, so I think > maybe it can be extended like: > For a given CPU, the I/O wait time is the time during which that CPU was > idle, and there is at least one outstanding disk I/O operation requested by > a task scheduled on that CPU. > > But tasks can migrate among cpus, so this definition maybe not accurate. > > I also saw some suggestions that it should be a global value, not per cpu, > but don`t see clear definition, so anyone have suggestions about it? > (personally guessing, maybe: there is task waiting for outstanding I/O while > all cpus are idle? But I don't think it is good...) It is possible to come up with definition for a single global number; per-cpu iowait numbers are doomed. But I don't see it matters one way or the other. Personally I would just make the kernel return 0 and be done with it.
[toc] | [prev] | [next] | [standalone]
| From | Cao jin <caoj.fnst@cn.fujitsu.com> |
|---|---|
| Date | 2016-06-08 09:10 +0200 |
| Message-ID | <rHFMK-5qw-13@gated-at.bofh.it> |
| In reply to | #1416095 |
On 06/07/2016 08:01 PM, Peter Zijlstra wrote: > On Tue, Jun 07, 2016 at 07:24:46PM +0800, Cao jin wrote: >> Hi, >> >> I noticed some problems about iowait entry of /proc/stat: it seems not >> accurate, and sometimes will decrease in SMP. >> >> For UP, we have a simple definition about iowait, which is: >> The time that the processor is idle, during which there is a task waiting >> for I/O. >> >> This definition seems don't fit well when step into SMP era, so I think >> maybe it can be extended like: >> For a given CPU, the I/O wait time is the time during which that CPU was >> idle, and there is at least one outstanding disk I/O operation requested by >> a task scheduled on that CPU. >> >> But tasks can migrate among cpus, so this definition maybe not accurate. >> >> I also saw some suggestions that it should be a global value, not per cpu, >> but don`t see clear definition, so anyone have suggestions about it? >> (personally guessing, maybe: there is task waiting for outstanding I/O while >> all cpus are idle? But I don't think it is good...) > > It is possible to come up with definition for a single global number; > per-cpu iowait numbers are doomed. > > But I don't see it matters one way or the other. Personally I would just > make the kernel return 0 and be done with it. > I see. Thanks peter -- Yours Sincerely, Cao jin
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web