Re: [PATCH][1/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: core

From: Andi Kleen
Date: Tue Jun 22 2004 - 05:22:36 EST



[few points I just noticed]

Andrew Morton <akpm@xxxxxxxx> writes:
>
> - a general overview of how the whole thing operates (what's
> PERFCTR_INTERRUPT_SUPPORT do? What interrupts are generated? Describe

The hardware can usually generate an interrupt when the performance counter
under or overflows. oprofile uses this too.


> the backpatching design, etc). What is "forbidden" on p4 siblings, and

p4 siblings share only a single set of performance counters, so you must
keep them synchronized.

>
> - <canofworms>cannot cpus_copy_to_user() share code with
> sys_sched_getaffinity()?</canofworms>

The sched_getaffinity code for that is broken, I'm about to submit
a patch for it. I haven't looked at that one.

>
> - Is there much point in making CONFIG_PERFCTR_VIRTUAL optional?

It slows down an important fast path (context switch)
But it would be better to use some back patching design like kernel hooks
to keep the cost for the common case (no perfctr getting switched)
low. If that common case can be kept at a "no checks at all" level
then it's good. That would be best for distribution kernels too.

-Andi

-
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/