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

Paul Mackerras
2009-05-22T10:08:49Z

Peter Zijlstra writes:

> Ah, should I read this as 'n' lmbench instances on a single cpu? So that
> we get multiple inheritance sets mixed and have to switch between them?

No, it's one lat_ctx instance, which creates N processes connected in
a ring with pipes, and passes a token around some number of times and
measures the overall time to do that. It subtracts off the time it
takes to do all the pipe reads and writes in a single process to get
an estimate of how much the context switches are costing.

Paul.