Re: [PATCH] [4/7] oprofile - NMI hook

From: John Levon (levon@movementarian.org)
Date: Tue Oct 15 2002 - 18:01:06 EST


On Wed, Oct 16, 2002 at 12:56:28AM +0200, Andi Kleen wrote:

> > This patch provides a simple api to let oprofile hook into
> > the NMI interrupt for the perfctr profiler.
>
> I would suggest using a notifier list instead (include/linux/notifier.h)
> This would handle multiple users cleanly.

How ? The only safe way I can see would be to spin lock around the NMI
(and try lock when an NMI arrives). This would either make every NMI
contend on a single spinlock, or require a NR_CPUS-sized array of
spinlocks, which is just ugly. And that wouldn't solve the
power-management problem - any NMI users need to collaborate to disable
NMI generation on a suspend.

regards
john

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



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:58 EST