Re: [PATCH v2] time: Remove CONFIG_TIMER_STATS
From: Thomas Gleixner
Date: Thu Feb 09 2017 - 08:45:18 EST
On Wed, 8 Feb 2017, Dave Jones wrote:
> On Wed, Feb 08, 2017 at 11:54:30AM -0800, Linus Torvalds wrote:
> > On Wed, Feb 8, 2017 at 11:26 AM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > >
> > > Given that the tracer can give the same information, this patch entirely
> > > removes CONFIG_TIMER_STATS.
> > >
> > > Suggested-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > > Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> > > Acked-by: John Stultz <john.stultz@xxxxxxxxxx>
> > Looks good to me. Let's wait for the 4.11 merge window though. I'm
> > assuming I'll get this through the tip timer tree..
> >From a quick look at the source, powertop uses this file, and appears to
> handle it gracefully if it fails to open, but it will lose functionality
> to determine if a timer is deferred.
The lookup happens when evaluating a timer_expire_entry tracing event.
With current kernels the same information can be retrieved from the
timer_start tracing event (flags field). And that's way more sensible than
scanning timer_stats because when the trace is evaluated there is no
guarantee at all that the timer is still queued and exposed there. That
should be trivial to fix in powertop.