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


Groups > linux.kernel > #1622832

Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints are enabled

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints are enabled
Date 2017-04-13 11:10 +0200
Message-ID <tvIVj-M6-3@gated-at.bofh.it> (permalink)
References <tvwKu-Gu-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 12, 2017 at 10:56:07PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> During my tests, I see this in my dmesg:
> 
> "Scheduler tracepoints stat_sleep, stat_iowait, stat_blocked and
> stat_runtime require the kernel parameter schedstats=enabled or
> kernel.sched_schedstats=1"
> 
> And found the commit:
> 
> cb2517653fc ("sched/debug: Make schedstats a runtime tunable that is
> disabled by default")
> 
> Which states:
> 
> "For tracepoints, there is a simple warning as it's not safe to activate
>  schedstats in the context when it's known the tracepoint may be wanted
>  but is unavailable."
> 
> I'm assuming that Mel did not know about the TRACE_EVENT_FN() and
> DEFINE_EVENT_FN() that allow for callbacks for tracepoints as they are
> enabled and disabled. I do not see any reason for not enabling
> schedstat when one of its tracepoints are enabled.
> 
> The state of schedstat is saved when the first tracepoint is enabled,
> and that state is put back when the tracepoints are disabled.

There is one additional complication with all this.

Dynamically enabling the sched_stats like this doesn't guarantee correct
information. So you've now taken away the informational print and
silently generate bollocks numbers.

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


Thread

[PATCH] sched: Enabled schedstat when schedstat tracepoints are  enabled Steven Rostedt <rostedt@goodmis.org> - 2017-04-12 22:10 +0200
  Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Peter Zijlstra <peterz@infradead.org> - 2017-04-13 11:10 +0200
    Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Peter Zijlstra <peterz@infradead.org> - 2017-04-13 11:10 +0200
      Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Steven Rostedt <rostedt@goodmis.org> - 2017-04-13 16:10 +0200
  Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Mel Gorman <mgorman@suse.de> - 2017-04-13 12:10 +0200
    Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Steven Rostedt <rostedt@goodmis.org> - 2017-04-13 16:20 +0200
  Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Srikar Dronamraju <srikar@linux.vnet.ibm.com> - 2017-04-13 13:10 +0200
    Re: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints  are enabled Steven Rostedt <rostedt@goodmis.org> - 2017-04-13 16:20 +0200

csiph-web