lkml.org 
[lkml]   [2017]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] sched: Enabled schedstat when schedstat tracepoints are enabled
On Thu, 13 Apr 2017 11:01:19 +0100
Mel Gorman <mgorman@suse.de> wrote:

> 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.
> >
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> You're right, I wasn't aware. Patch looks ok. When it triggers, there
> will be a short interval of garbage numbers but that's the same as what
> happens currently. It's not deliberate action any more that would flag
> to the user that there is a hazard but I think it'll be manageable.

I wonder if there's a way to figure out when the measurements are no
longer garbage, and have a tracepoint or something to notify the user
applications that they are good to go? Or perhaps even suppress the
tracepoints (TRACE_EVENT_FN_COND) until they are stable.

>
> Acked-by: Mel Gorman <mgorman@suse.de>

Thanks!

-- Steve

\
 
 \ /
  Last update: 2017-04-13 16:12    [W:0.073 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site