From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752865AbcKIBeI (ORCPT ); Tue, 8 Nov 2016 20:34:08 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:64386 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751638AbcKIBeG (ORCPT ); Tue, 8 Nov 2016 20:34:06 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="12796509" Date: Wed, 9 Nov 2016 09:33:37 +0800 From: Chao Fan To: , CC: , , , , Cao Jin Subject: Re: [PATCH] Change the document about iowait Message-ID: <20161109013337.GA9904@localhost.localdomain> References: <1477449688-19397-1-git-send-email-fanc.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1477449688-19397-1-git-send-email-fanc.fnst@cn.fujitsu.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [10.167.226.75] X-yoursite-MailScanner-ID: 6129343972A7.AA553 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: fanc.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >Signed-off-by: Chao Fan >--- > 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 >