Fine-grained locking for POSIX local sockets (UNIX domain
sockets)
Maxim Sobolev
sobomax at FreeBSD.ORG
Fri May 12 21:34:19 UTC 2006
On Fri, May 12, 2006 at 04:41:11PM -0400, Andrew Gallatin wrote:
>
> In addition to this linux vsyscall, there is the MacOSX/Darwin
> commpage. The map machine-specific implementations of atomic
> operations, bcopy, bzero, spinlocks, pthread_getspecific, etc into a
> common page mapped into userspace applications. The also do a (mostly)
> syscall-free gettimeoday this way.
>
> See http://fxr.watson.org/fxr/source/osfmk/ppc/commpage/?v=xnu-792
>
> Obviously, we could not take the code due to APSL infection (unless
> Apple were to donate it), but it is something else to look at.
As somebody suggested, it can be easily done by exporting ELF
shared object via md(4)-like device driver and then libc will be
able to dlopen() and use it. This should provide the same
performance as a "magic-page" approach, but it much easier to
implement and it looks much less "hackish".
-Maxim
More information about the freebsd-current
mailing list