From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754499AbbHCSnm (ORCPT ); Mon, 3 Aug 2015 14:43:42 -0400 Received: from casper.infradead.org ([85.118.1.10]:50465 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753656AbbHCSnl (ORCPT ); Mon, 3 Aug 2015 14:43:41 -0400 Date: Mon, 3 Aug 2015 20:43:38 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: yangoliver , mingo@redhat.com, linux-kernel@vger.kernel.org, Yong Yang Subject: Re: [PATCH 2/2] sched: Trace point sched_stat_sleep should cover iowait case Message-ID: <20150803184338.GZ25159@twins.programming.kicks-ass.net> References: <1438002714-8158-1-git-send-email-yangoliver@gmail.com> <20150803133528.11d77554@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150803133528.11d77554@gandalf.local.home> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 03, 2015 at 01:35:28PM -0400, Steven Rostedt wrote: > On Mon, 27 Jul 2015 09:11:52 -0400 > yangoliver wrote: > > > Per sched_stat_sleep definition in sched.h, it should include > > iowait case. This can also relect the design of sum_sleep_runtime > > statistic, as this counter also includes the io_wait. > > > > Signed-off-by: Yong Yang > > --- > > kernel/sched/fair.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index d113c3b..85677bf 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -3018,6 +3018,8 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) > > se->statistics.sum_sleep_runtime += delta; > > > > if (tsk) { > > + trace_sched_stat_sleep(tsk, delta); > > + > > if (tsk->in_iowait) { > > se->statistics.iowait_sum += delta; > > se->statistics.iowait_count++; > No, that's broken in two ways. Firstly you don't change semantics of stuff just because of a comment and secondly iowait has nothing what all to do with INTERRUPTIBLE/sleep vs UNINTERRUPTIBLE/blocked. And wtf are you doing sending sched patches and not Cc maintainers.