proposed smp_rendezvous change

Andriy Gapon avg at FreeBSD.org
Fri May 13 19:05:38 UTC 2011


on 13/05/2011 20:13 Max Laier said the following:
> Disregard this ... I misread the diff.  You are indeed using [2] correctly as 
> the "all-clear" semaphore.  I still believe, that it is safer/cleaner to do 
> this spin before releasing the lock instead (see my patch).

Maybe.  I consider my approach a minor optimization - that is, I think that
normally smp_rendezvous calls would be sparse enough to never require that
synchronization (as proved by the past experience).  So synchroning/delaying the
master CPU at the end of smp_rendezvous would slightly hurt performance.  Having
the check at the start should trigger the synchronization only when it is really
required.

-- 
Andriy Gapon


More information about the freebsd-current mailing list