lkml.org 
[lkml]   [2010]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 13/19] perf: Per cpu-context rotation timer
On Tue, 7 Sep 2010, Peter Zijlstra wrote:

> On Tue, 2010-09-07 at 18:46 +0200, Peter Zijlstra wrote:
>
> > @@ -5904,6 +5930,9 @@ static void __init perf_event_init_all_c
> >
> > cpuctx = &per_cpu(perf_cpu_context, cpu);
> > __perf_event_init_context(&cpuctx->ctx, NULL);
> > + cpuctx->timer_interval = TICK_NSEC;
> > + hrtimer_init(&cpuctx->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> > + cpuctx->timer.function = perf_event_context_tick;
> > }
>
> > +static void perf_pmu_rotate_start(struct pmu *pmu)
> > +{
> > + struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
> > +
> > + if (hrtimer_active(&cpuctx->timer))
> > + return;
> > +
> > + __hrtimer_start_range_ns(&cpuctx->timer,
> > + ns_to_ktime(cpuctx->timer_interval), 0,
> > + HRTIMER_MODE_REL, 0);
> > }
>
> This probably wants a fuzz factor that lets it fold into the tick we
> already have. Thomas what's the easiest way to do that, give it a soft
> limit of 1ns and hardlimit of TICK_NSEC?

Hmm, why don't you hang it off the tick right away ?

Thanks,

tglx


\
 
 \ /
  Last update: 2010-09-07 19:37    [W:0.127 / U:17.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site