Re: NMI handling rework

Zwane Mwaikambo (zwane@holomorphy.com)
Fri, 15 Nov 2002 00:12:29 -0500 (EST)


On Thu, 14 Nov 2002, Corey Minyard wrote:

> RCU does. Basically, the code pulls it from the list atomically wrt to
> the NMI handler, and uses RCU to schedule the actual free of the data to
> be done after all CPUs have gone to idle or returned from interrupts.
> It's subtle, you have to think about it a little. But it does work.

Still not convinced, i still want to know which interrupt rate and how
many processors. Are the following functions really protected from say
NMIs at 300,000/s? request_nmi actually looks dodgiest.

static void free_nmi_handler(void *arg)
{
struct nmi_handler *handler = arg;

INIT_LIST_HEAD(&(handler->link));
complete(&(handler->complete));
}

void release_nmi(struct nmi_handler *handler)
{
spin_lock(&nmi_handler_lock);
list_del_rcu(&(handler->link));
init_completion(&(handler->complete));
call_rcu(&(handler->rcu), free_nmi_handler, handler);
spin_unlock(&nmi_handler_lock);
}

-- 
function.linuxpower.ca

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