Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244054

Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From yangoliver <yang_oliver@hotmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
Date Sun, 11 Oct 2015 05:40:02 +0200
Message-ID <qifEm-4yv-1@gated-at.bofh.it> (permalink)
References <pQQtY-2W3-29@gated-at.bofh.it> <pTrSq-1uf-3@gated-at.bofh.it> <pTEwh-3hI-11@gated-at.bofh.it>
X-Original-To Oliver Yang <yang_oliver@hotmail.com>
X-Greylist delayed 301 seconds by postgrey-1.27 at vger.kernel.org; Sat, 10 Oct 2015 23:38:59 EDT
X-Tmn [Ec102OoFDxoSmUtIDROkgSEf7np4L0AA4tLvcqux+bY=]
X-Originating-Email [yang_oliver@hotmail.com]
X-X-Sender oliver@FC22-64.localdomain
User-Agent Alpine 2.20 (LFD 67 2015-01-07)
MIME-Version 1.0
Content-Type text/plain; charset="US-ASCII"
X-Originalarrivaltime 11 Oct 2015 03:33:55.0210 (UTC) FILETIME=[A8025EA0:01D103D5]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 77
Organization linux.* mail to news gateway
X-Original-Cc Steven Rostedt <rostedt@goodmis.org>, mingo@redhat.com, linux-kernel@vger.kernel.org, Yong Yang <yangoliver@gmail.com>, Peter Zijlstra <peterz@infradead.org>
X-Original-Date Sat, 10 Oct 2015 23:33:46 -0400
X-Original-Message-ID <BLU436-SMTP79FFF8B7E36D58A34C06A78A320@phx.gbl>
X-Original-References <BLU436-SMTP1213D964BD9EFC5CF8A34D08A8E0@phx.gbl> <20150803133428.5fd137ec@gandalf.local.home> <BLU436-SMTP1068D40BBCD5342AD394C978A760@phx.gbl>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1244054

Show key headers only | View raw


Steve,

Any comments about this patch?

I think I addressed your question about why sched_stat_template is still 
required. Because another tracepoint depends on it, and that tracepoint
doesn't depend on SCHEDSTATS.

If you thought this patch is valid, I could re-submit it with a separte 
patch.

On Tue, 4 Aug 2015, Oliver Yang wrote:

> 
> 
> On 2015/8/4 1:34, Steven Rostedt wrote:
> > On Mon, 27 Jul 2015 09:11:51 -0400
> > yangoliver <yang_oliver@hotmail.com> wrote:
> >
> >> When SCHEDSTATS is not enabled, follow trace points shouldn't be
> >> accessed by default,
> >>
> >> 	sched:sched_stat_wait
> >> 	sched:sched_stat_sleep
> >> 	sched:sched_stat_iowait
> >> 	sched:sched_stat_blocked
> >>
> >> These trace points should only be available when SCHEDSTATS is
> >> enabled.
> >>
> >> Signed-off-by: Yong Yang <yangoliver@gmail.com>
> >> ---
> >>  include/trace/events/sched.h | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> >> index d57a575..5b34309 100644
> >> --- a/include/trace/events/sched.h
> >> +++ b/include/trace/events/sched.h
> >> @@ -334,6 +334,7 @@ DECLARE_EVENT_CLASS(sched_stat_template,
> >>  );
> >>  
> >>  
> >> +#ifdef CONFIG_SCHEDSTATS
> > Why not also surround the sched_stat_template too? That also creates
> > code even if no event uses it.
> Steve,
> 
> Because the sched_stat_template is used by sched_stat_runtime.
> The sched_stat_runtime is used event without SCHEDSTATS option enabled.
> 
> And the se.sum_exec_runtime counter is also similar. I don't think this counter is
> defined for SCHEDSTATS.
> 
> Yes. I just try to make our trace points design be similar with SCHEDSTATS counters
> design.
> 
> > -- Steve
> >
> >>  /*
> >>   * Tracepoint for accounting wait time (time the task is runnable
> >>   * but not actually running due to scheduler contention).
> >> @@ -364,6 +365,7 @@ DEFINE_EVENT(sched_stat_template, sched_stat_iowait,
> >>  DEFINE_EVENT(sched_stat_template, sched_stat_blocked,
> >>  	     TP_PROTO(struct task_struct *tsk, u64 delay),
> >>  	     TP_ARGS(tsk, delay));
> >> +#endif
> >>  
> >>  /*
> >>   * Tracepoint for accounting runtime (time the task is executing
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 1/2] sched: Some sched trace points should depend on  SCHEDSTATS yangoliver <yang_oliver@hotmail.com> - 2015-10-11 05:40 +0200

csiph-web