Re: [PATCH 1/3] perf: add context field to perf_event

From: Will Deacon
Date: Thu Jul 21 2011 - 12:38:18 EST

On Thu, Jul 21, 2011 at 04:59:00PM +0100, Avi Kivity wrote:
> On 07/21/2011 06:46 PM, Will Deacon wrote:
> > >
> > > This is (and must be) called from a preempt disabled context, no mutexes
> > > around here.
> >
> > Bah, yes, that is essential if you're dealing with current. Maybe use a
> > spinlock instead?
> Could work. Not thrilled about adding it to the kvm hot path, but I
> can't say it will make a measurable impact.

Understood, but at least it doesn't contribute to finish_task_switch. I also
wouldn't expect to have multiple preempt registrations in parallel for the
same task so that lock should rarely (if ever) be contended.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at