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] [day] [month] [year] [list]
Date:	Wed, 3 Feb 2016 09:15:26 +0000
From:	Mel Gorman <mgorman@...hsingularity.net>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	Mike Galbraith <mgalbraith@...e.de>,
	LKML <linux-kernel@...r.kernel.org>,
	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Subject: Re: [PATCH 1/1] sched: Make schedstats a runtime tunable that is
 disabled by default v3

On Tue, Feb 02, 2016 at 08:15:14PM +0530, Srikar Dronamraju wrote:
> > Yes. This on top? It's not completely bullet proof as a user could both
> > force schedstat disabled and enable sleep profiling but it's a waste of
> > memory to guard against it
> > 
> > diff --git a/include/linux/sched.h b/include/linux/sched.h
> > index a10494a94cc3..5c2cd37c42e9 100644
> > --- a/include/linux/sched.h
> > +++ b/include/linux/sched.h
> > @@ -920,6 +920,14 @@ static inline int sched_info_on(void)
> >  #endif
> >  }
> > 
> > +#ifdef CONFIG_SCHEDSTATS
> > +void force_schedstat_enabled(void);
> > +#else
> > +static inline void force_schedstat_enabled(void)
> > +{
> > +}
> > +#endif
> 
> One nit:
> Since force_schedstat_enabled is called under CONFIG_SCHEDSTATS
> we may not want the static define.
> 

I'm not sure I get this either :(. It is a static inline that does
nothing under !CONFIG_SCHEDSTAT because tehre is nothing to do.
Otherwise it needs to be available for profiling and I just spotted it's
needed by latencytop too.

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists