smp_rendezvous runs with interrupts and preemption enabled on unicore systems

Ryan Stone rysto32 at
Tue Nov 1 15:28:13 UTC 2011

On Mon, Oct 31, 2011 at 7:43 PM, Attilio Rao <attilio at> wrote:
> I'm not entirely sure why this exactly breaks though (do you see that
> happening with a random rendezvous callback or it is always the
> same?), because that just becames a simple function calling on cpu0,
> even if I think that there is still a bug as smp_rendezvous callbacks
> may expect to have interrupts and preemption disabled and the
> short-circuit breaks that assumption.

I have only observed the problem with i686_mrstoreone(smp_rendezvous
is called from i686_mrstore).

I notice that i686_mrstoreone does scary things like disabling the
cache and global TLB entries.  My experience was that everything got
very slow when i686_mrstoreone was preempted, so it easily could be
the case that the system because so slow with the cache disabled that
it became livelocked.

> I don't think that we strictly need the lock here, my preferred
> solution would be (only test-compiled):

I tried the same thing for the SMP case, and it fixed my problem.

More information about the freebsd-current mailing list