Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2010 15:26:55 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        freebsd-hackers@freebsd.org, "Robert N. M. Watson" <rwatson@freebsd.org>
Subject:   Re: dtrace/cyclic deadlock
Message-ID:  <4CEBC11F.9000402@freebsd.org>
In-Reply-To: <4CEB6039.2040700@freebsd.org>
References:  <4CEB6039.2040700@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CEBC11F.9000402>