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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 07 Sep 2010 19:36:15 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	paulus <paulus@...ba.org>,
	stephane eranian <eranian@...glemail.com>,
	Robert Richter <robert.richter@....com>,
	Will Deacon <will.deacon@....com>,
	Paul Mundt <lethal@...ux-sh.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Cyrill Gorcunov <gorcunov@...il.com>,
	Lin Ming <ming.m.lin@...el.com>,
	Yanmin <yanmin_zhang@...ux.intel.com>,
	Deng-Cheng Zhu <dengcheng.zhu@...il.com>,
	David Miller <davem@...emloft.net>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Subject: Re: [RFC][PATCH 13/19] perf: Per cpu-context rotation timer

On Tue, 2010-09-07 at 19:33 +0200, Thomas Gleixner wrote:
> 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 ?

Because some people (Corey) want to be able to have different rotation
periods per pmu driver, so a timer per context was the easy way out.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ