linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Mel Gorman <mgorman@techsingularity.net>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] sched/debug: fix deadlock when enabling sched events
Date: Wed, 8 Jun 2016 15:15:59 +0200	[thread overview]
Message-ID: <20160608131559.GA15843@gmail.com> (raw)
In-Reply-To: <20160608131237.3tixvrtpqvfv5kmg@treble>


* Josh Poimboeuf <jpoimboe@redhat.com> wrote:

> On Wed, Jun 08, 2016 at 09:56:12AM +0200, Ingo Molnar wrote:
> > 
> > * Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > 
> > > --- a/kernel/sched/fair.c
> > > +++ b/kernel/sched/fair.c
> > > @@ -789,6 +789,13 @@ static void update_curr_fair(struct rq *rq)
> > >  	update_curr(cfs_rq_of(&rq->curr->se));
> > >  }
> > >  
> > > +void trace_sched_stat_register(void)
> > > +{
> > > +#ifdef CONFIG_SCHEDSTATS
> > > +	force_schedstat_enabled();
> > > +#endif
> > > +}
> > 
> > I think it would be cleaner to provide an empty force_schedstat_enabled() 
> > definition in sched.h, on !CONFIG_SCHEDSTATS.
> 
> Yes, agreed.
> 
> > But it might make sense to further decouple schedstats from tracing?
> 
> Looking at how we could do that:
> 
> - The sched_stat_wait tracepoint is dependent on the wait_start schedstat.

Can we maintain wait_start unconditionally? Having config dependent tracepoints 
sucks.

> - The sched_stat_sleep tracepoint is dependent on the sleep_start
>   schedstat.

Ditto.

> - The sched_stat_iowait and sched_stat_blocked tracepoints are dependent
>   on the block_start schedstat.

Ditto.

> We could move those three schedstats values out of sched_statistics and
> into sched_entity, and then always update them regardless of
> CONFIG_SCHEDSTATS.
> 
> That would ensure these tracepoints always work.  But then again it
> would add a little bit of runtime overhead.
> 
> I don't have a strong opinion either way.  Thoughts?

Please do a before/after 'size vmlinux' dump of a defconfig build with tracing 
disabled. I.e. how much code overhead does the updating of those variables add?

Thanks,

	Ingo

  reply	other threads:[~2016-06-08 13:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 19:43 [PATCH 0/2] sched/debug: more schedstats fixes Josh Poimboeuf
2016-06-07 19:43 ` [PATCH 1/2] sched/debug: fix 'schedstats=enable' cmdline option Josh Poimboeuf
2016-06-08  8:06   ` Mel Gorman
2016-06-08 14:21   ` [tip:sched/core] sched/debug: Fix " tip-bot for Josh Poimboeuf
2016-06-07 19:43 ` [PATCH 2/2] sched/debug: fix deadlock when enabling sched events Josh Poimboeuf
2016-06-07 19:54   ` Peter Zijlstra
2016-06-07 21:02     ` Josh Poimboeuf
2016-06-08  8:13     ` Mel Gorman
2016-06-07 21:06   ` Josh Poimboeuf
2016-06-08  7:56   ` Ingo Molnar
2016-06-08 13:12     ` Josh Poimboeuf
2016-06-08 13:15       ` Ingo Molnar [this message]
2016-06-13  7:32         ` [PATCH v2] " Josh Poimboeuf
2016-06-14 11:35           ` [tip:sched/urgent] sched/debug: Fix " tip-bot for Josh Poimboeuf
2016-06-08  8:11   ` [PATCH 2/2] sched/debug: fix " Mel Gorman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160608131559.GA15843@gmail.com \
    --to=mingo@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).