[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1296070683.15234.11.camel@laptop>
Date: Wed, 26 Jan 2011 20:38:03 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Alan Stern <stern@...land.harvard.edu>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Prasad <prasad@...ux.vnet.ibm.com>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: Q: perf_install_in_context/perf_event_enable are racy?
On Wed, 2011-01-26 at 20:33 +0100, Peter Zijlstra wrote:
> Wouldn't something like the below cure things too?
> +struct task_function_call {
> + struct task_struct *p;
> + void (*func)(void *info);
> + void *info;
> +};
> +
> +void task_function_trampoline(void *data)
> +{
> + struct task_function_call *tfc = data;
> +
> + if (this_rq()->curr != tfc->p)
> + return;
> +
> + tfc->func(tfc->data);
> +}
tfc->info of course ;-)
--
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