lkml.org 
[lkml]   [2016]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-02-03 10:41    [W:0.055 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site