lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160608131237.3tixvrtpqvfv5kmg@treble>
Date:	Wed, 8 Jun 2016 08:12:37 -0500
From:	Josh Poimboeuf <jpoimboe@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org,
	Mel Gorman <mgorman@...hsingularity.net>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] sched/debug: fix deadlock when enabling sched events

On Wed, Jun 08, 2016 at 09:56:12AM +0200, Ingo Molnar wrote:
> 
> * Josh Poimboeuf <jpoimboe@...hat.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.

- The sched_stat_sleep tracepoint is dependent on the sleep_start
  schedstat.

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

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?

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ