Re: [PATCH 2/2] perf_counter: optimize context switch betweenidentical inherited contexts

From: Peter Zijlstra
Date: Fri May 22 2009 - 04:16:25 EST


On Fri, 2009-05-22 at 14:27 +1000, Paul Mackerras wrote:
> Since we don't have individual fds for the counters in a cloned
> context, the only thing that can make two clones of a given parent
> different after they have been cloned is enabling or disabling all
> counters with prctl. To account for this, we keep a count of the
> number of enabled counters in each context. Two contexts must have
> the same number of enabled counters to be considered equivalent.

Curious point that.. so prctl() can disable counters it doesn't own.

Shouldn't we instead fix that?

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