From owner-freebsd-current@FreeBSD.ORG Fri May 12 21:34:18 2006 Return-Path: X-Original-To: current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AD6116AFBA; Fri, 12 May 2006 21:34:18 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 258B343D90; Fri, 12 May 2006 21:34:01 +0000 (GMT) (envelope-from sobomax@sippysoft.com) Received: from sippysoft.com (localhost.360sip.com [127.0.0.1]) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k4CLXVJw073388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 May 2006 14:33:31 -0700 (PDT) (envelope-from sobomax@sippysoft.com) Received: (from sobomax@localhost) by sippysoft.com (8.13.6/8.13.6/Submit) id k4CLXVwi073387; Fri, 12 May 2006 14:33:31 -0700 (PDT) (envelope-from sobomax) Date: Fri, 12 May 2006 14:33:30 -0700 From: Maxim Sobolev To: Andrew Gallatin Message-ID: <20060512213330.GA73197@gk.360sip.com> References: <20060506150622.C17611@fledge.watson.org> <20060509181302.GD3636@eucla.lemis.com> <20060509182330.GB92714@xor.obsecurity.org> <200605100726.28243.davidxu@freebsd.org> <44613469.2050000@freebsd.org> <4461522D.9060405@freebsd.org> <17508.62183.562795.176709@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17508.62183.562795.176709@grasshopper.cs.duke.edu> User-Agent: Mutt/1.4.2.1i Cc: Daniel Eischen , David Xu , current@FreeBSD.ORG Subject: Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 21:34:19 -0000 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