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]
Message-ID: <1283879331.1930.1633.camel@laptop>
Date:	Tue, 07 Sep 2010 19:08:51 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	paulus <paulus@...ba.org>
Cc:	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
Subject: Re: [RFC][PATCH 13/19] perf: Per cpu-context rotation timer

On Tue, 2010-09-07 at 18:46 +0200, Peter Zijlstra wrote:
> +static enum hrtimer_restart perf_event_context_tick(struct hrtimer
> *timer)
>  {
> +       enum hrtimer_restart restart = HRTIMER_NORESTART;
>         struct perf_cpu_context *cpuctx;
>         struct perf_event_context *ctx;
>         int rotate = 0;
>  
> +       cpuctx = container_of(timer, struct perf_cpu_context, timer);
>  
> +       if (cpuctx->ctx.nr_events) {
> +               restart = HRTIMER_RESTART;
> +               if (cpuctx->ctx.nr_events != cpuctx->ctx.nr_active)
> +                       rotate = 1;
> +       }
>  
> +       ctx = current->perf_event_ctxp;
> +       if (ctx && ctx->nr_events) {
> +               restart = HRTIMER_RESTART;
> +               if (ctx->nr_events != ctx->nr_active)
> +                       rotate = 1;
> +       } 

Note to self, this is probably racy against pmu_rotate_start().
--
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