linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Change the document about iowait
@ 2016-10-26  2:41 Chao Fan
  2016-11-09  1:33 ` Chao Fan
  2016-11-13 15:47 ` Jonathan Corbet
  0 siblings, 2 replies; 5+ messages in thread
From: Chao Fan @ 2016-10-26  2:41 UTC (permalink / raw)
  To: linux-doc, linux-kernel
  Cc: peterz, corbet, akpm, izumi.taku, Chao Fan, Cao Jin

The iowait is not reliable by reading from /proc/stat, so this
method to get iowait is not suggested. And we mark it in the
document.

Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
---
 Documentation/filesystems/proc.txt | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 74329fd..71f5096 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1305,7 +1305,16 @@ second).  The meanings of the columns are as follows, from left to right:
 - nice: niced processes executing in user mode
 - system: processes executing in kernel mode
 - idle: twiddling thumbs
-- iowait: waiting for I/O to complete
+- iowait: In a word, iowait stands for waiting for I/O to complete. But there
+  are several problems:
+  1. Cpu will not wait for I/O to complete, iowait is the time that a task is
+     waiting for I/O to complete. When cpu goes into idle state for
+     outstanding task io, another task will be scheduled on this CPU.
+  2. In a multi-core CPU, the task waiting for I/O to complete is not running
+     on any CPU, so the iowait of each CPU is difficult to calculate.
+  3. The value of iowait field in /proc/stat will decrease in certain
+     conditions.
+  So, the iowait is not reliable by reading from /proc/stat.
 - irq: servicing interrupts
 - softirq: servicing softirqs
 - steal: involuntary wait
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change the document about iowait
  2016-10-26  2:41 [PATCH] Change the document about iowait Chao Fan
@ 2016-11-09  1:33 ` Chao Fan
  2016-11-13 15:47 ` Jonathan Corbet
  1 sibling, 0 replies; 5+ messages in thread
From: Chao Fan @ 2016-11-09  1:33 UTC (permalink / raw)
  To: linux-doc, linux-kernel; +Cc: peterz, corbet, akpm, izumi.taku, Cao Jin

ping

Thanks,
Chao Fan

On Wed, Oct 26, 2016 at 10:41:28AM +0800, Chao Fan wrote:
>The iowait is not reliable by reading from /proc/stat, so this
>method to get iowait is not suggested. And we mark it in the
>document.
>
>Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
>Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
>---
> Documentation/filesystems/proc.txt | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
>diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
>index 74329fd..71f5096 100644
>--- a/Documentation/filesystems/proc.txt
>+++ b/Documentation/filesystems/proc.txt
>@@ -1305,7 +1305,16 @@ second).  The meanings of the columns are as follows, from left to right:
> - nice: niced processes executing in user mode
> - system: processes executing in kernel mode
> - idle: twiddling thumbs
>-- iowait: waiting for I/O to complete
>+- iowait: In a word, iowait stands for waiting for I/O to complete. But there
>+  are several problems:
>+  1. Cpu will not wait for I/O to complete, iowait is the time that a task is
>+     waiting for I/O to complete. When cpu goes into idle state for
>+     outstanding task io, another task will be scheduled on this CPU.
>+  2. In a multi-core CPU, the task waiting for I/O to complete is not running
>+     on any CPU, so the iowait of each CPU is difficult to calculate.
>+  3. The value of iowait field in /proc/stat will decrease in certain
>+     conditions.
>+  So, the iowait is not reliable by reading from /proc/stat.
> - irq: servicing interrupts
> - softirq: servicing softirqs
> - steal: involuntary wait
>-- 
>2.7.4
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change the document about iowait
  2016-10-26  2:41 [PATCH] Change the document about iowait Chao Fan
  2016-11-09  1:33 ` Chao Fan
@ 2016-11-13 15:47 ` Jonathan Corbet
  2016-11-14  3:42   ` Chao Fan
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2016-11-13 15:47 UTC (permalink / raw)
  To: Chao Fan; +Cc: linux-doc, linux-kernel, peterz, akpm, izumi.taku, Cao Jin

On Wed, 26 Oct 2016 10:41:28 +0800
Chao Fan <fanc.fnst@cn.fujitsu.com> wrote:

> The iowait is not reliable by reading from /proc/stat, so this
> method to get iowait is not suggested. And we mark it in the
> document.

Sorry for the delay on this.  Life has been...challenging...

> Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>

What does this signoff chain mean?  

> ---
>  Documentation/filesystems/proc.txt | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
> index 74329fd..71f5096 100644
> --- a/Documentation/filesystems/proc.txt
> +++ b/Documentation/filesystems/proc.txt
> @@ -1305,7 +1305,16 @@ second).  The meanings of the columns are as follows, from left to right:
>  - nice: niced processes executing in user mode
>  - system: processes executing in kernel mode
>  - idle: twiddling thumbs
> -- iowait: waiting for I/O to complete
> +- iowait: In a word, iowait stands for waiting for I/O to complete. But there
> +  are several problems:
> +  1. Cpu will not wait for I/O to complete, iowait is the time that a task is
> +     waiting for I/O to complete. When cpu goes into idle state for
> +     outstanding task io, another task will be scheduled on this CPU.
> +  2. In a multi-core CPU, the task waiting for I/O to complete is not running
> +     on any CPU, so the iowait of each CPU is difficult to calculate.
> +  3. The value of iowait field in /proc/stat will decrease in certain
> +     conditions.
> +  So, the iowait is not reliable by reading from /proc/stat.
>  - irq: servicing interrupts

So I suppose I can apply this.  But is there any chance of making it say
what iowait actually measures, rather than just saying that it's
unreliable? 

Thanks,

jon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change the document about iowait
  2016-11-13 15:47 ` Jonathan Corbet
@ 2016-11-14  3:42   ` Chao Fan
  2016-11-19 17:39     ` Jonathan Corbet
  0 siblings, 1 reply; 5+ messages in thread
From: Chao Fan @ 2016-11-14  3:42 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-doc, linux-kernel, peterz, akpm, izumi.taku, Cao Jin

On Sun, Nov 13, 2016 at 08:47:55AM -0700, Jonathan Corbet wrote:
>On Wed, 26 Oct 2016 10:41:28 +0800
>Chao Fan <fanc.fnst@cn.fujitsu.com> wrote:
>
>> The iowait is not reliable by reading from /proc/stat, so this
>> method to get iowait is not suggested. And we mark it in the
>> document.
>
>Sorry for the delay on this.  Life has been...challenging...
>
>> Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
>> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
>
>What does this signoff chain mean?  

Hi jon,

I made this patch. He is my colleague who helped me a lot on
investigating why this value decrease, so I added his s-o-b.
I didn't know how to put the position, but both of us are
responsible for this patch. Should I change and resend it?

>
>> ---
>>  Documentation/filesystems/proc.txt | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
>> index 74329fd..71f5096 100644
>> --- a/Documentation/filesystems/proc.txt
>> +++ b/Documentation/filesystems/proc.txt
>> @@ -1305,7 +1305,16 @@ second).  The meanings of the columns are as follows, from left to right:
>>  - nice: niced processes executing in user mode
>>  - system: processes executing in kernel mode
>>  - idle: twiddling thumbs
>> -- iowait: waiting for I/O to complete
>> +- iowait: In a word, iowait stands for waiting for I/O to complete. But there
>> +  are several problems:
>> +  1. Cpu will not wait for I/O to complete, iowait is the time that a task is
>> +     waiting for I/O to complete. When cpu goes into idle state for
>> +     outstanding task io, another task will be scheduled on this CPU.
>> +  2. In a multi-core CPU, the task waiting for I/O to complete is not running
>> +     on any CPU, so the iowait of each CPU is difficult to calculate.
>> +  3. The value of iowait field in /proc/stat will decrease in certain
>> +     conditions.
>> +  So, the iowait is not reliable by reading from /proc/stat.
>>  - irq: servicing interrupts
>
>So I suppose I can apply this.  But is there any chance of making it say
>what iowait actually measures, rather than just saying that it's
>unreliable? 

Current iowait definition and way of accounting is legacy from UP era,
it works well in UP era, but when step into SMP era, both definition
and accounting way are not suitable, one example is when task migrating
between CPUs. In SMP era, this value should be a global one, not per-cpu.
So, it is hard to say what iowait actually measures, the current problem
is: a appropriate definition (iowait in SMP) is not clear.

Quote someone's words, its accounting is "a steaming pile of crap".

Whether the explanation is OK?

Thanks,
Chao Fan

>
>Thanks,
>
>jon
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change the document about iowait
  2016-11-14  3:42   ` Chao Fan
@ 2016-11-19 17:39     ` Jonathan Corbet
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2016-11-19 17:39 UTC (permalink / raw)
  To: Chao Fan; +Cc: linux-doc, linux-kernel, peterz, akpm, izumi.taku, Cao Jin

On Mon, 14 Nov 2016 11:42:41 +0800
Chao Fan <fanc.fnst@cn.fujitsu.com> wrote:

> >Sorry for the delay on this.  Life has been...challenging...
> >  
> >> Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
> >> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>  
> >
> >What does this signoff chain mean?    
> 
> Hi jon,
> 
> I made this patch. He is my colleague who helped me a lot on
> investigating why this value decrease, so I added his s-o-b.
> I didn't know how to put the position, but both of us are
> responsible for this patch. Should I change and resend it?

The meaning of Signed-off-by is defined in the DOC, as seen in
Documentation/submitting-patches.rst.  In this case, the better approach
would have been to credit Cao Jin in the changelog, since he didn't write
the patch.

For a little documentation tweak like this it's not that big a deal,
though, so I simply gone ahead and applied it.

Thanks,

jon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-19 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26  2:41 [PATCH] Change the document about iowait Chao Fan
2016-11-09  1:33 ` Chao Fan
2016-11-13 15:47 ` Jonathan Corbet
2016-11-14  3:42   ` Chao Fan
2016-11-19 17:39     ` Jonathan Corbet

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).