dtrace/cyclic deadlock
Andriy Gapon
avg at freebsd.org
Tue Nov 23 13:26:57 UTC 2010
on 23/11/2010 08:33 Andriy Gapon said the following:
> I think that this is quite similar to what we do for per-CPU caches in UMA and
> so the same approach should work here.
> That is, as in (Open)Solaris, the data should be accessed only from the owning
> CPU and spinlock_enter()/spinlock_exit() should be used to prevent races between
> non-interrupt code and nested interrupt code.
Here's a patch that makes our version of cyclic.c a little bit closer to the
upstream version whilst implementing the above idea:
http://people.freebsd.org/~avg/cyclic-deadlock.diff
All accesses to per-CPU cyclics data are performed strictly from the corresponding
CPUs in an interrupt or interrupt-like context. "Upcalls" occur in event timer's
interrupt filter and all down calls are performed via smp_rendezvous_cpus().
I will appreciate reviews and testing.
Thanks!
--
Andriy Gapon
More information about the freebsd-hackers
mailing list