Re: NMI handling rework for x86

Dipankar Sarma (dipankar@in.ibm.com)
Fri, 15 Nov 2002 11:40:12 +0530


On Thu, Nov 14, 2002 at 11:40:04PM -0500, Zwane Mwaikambo wrote:
> What interrupt rate have you tested this at? SMP? Adding handlers at
> runtime? I'm still skeptical on how RCU protects you, but i'm RCU clueless...

The RCU part is fairly simple - you want to avoid having to acquire
a lock for every NMI event to walk the handler so you do it
lockfree. If a process running in a different CPU tries to
free an nmi handler, it removes it from the list, issues an
rcu callback (to be invoked after all CPUs have gone through
a context switch or executed user-level code ensuring that the
deleted nmi handler can't be running) and waits for completion of
the callback. The rcu callback handler wakes it up.
It is all hidden under list_add_rcu()/list_del_rcu() and __list_for_each_rcu().

Thanks

-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
-
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/