Messages in this thread | | | Date | Wed, 3 Feb 2016 09:15:26 +0000 | From | Mel Gorman <> | 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
| |