From owner-freebsd-arch Tue Jan 21 14:53:35 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E661F37B401 for ; Tue, 21 Jan 2003 14:53:33 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 431B943EB2 for ; Tue, 21 Jan 2003 14:53:33 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h0LMrWhk018740 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 21 Jan 2003 17:53:32 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h0LMrVhA018739; Tue, 21 Jan 2003 17:53:31 -0500 (EST) (envelope-from wollman) Date: Tue, 21 Jan 2003 17:53:31 -0500 (EST) From: Garrett Wollman Message-Id: <200301212253.h0LMrVhA018739@khavrinen.lcs.mit.edu> To: peter@wemm.org Subject: Re: getsysfd() patch #1 (Re: Virtual memory question) In-Reply-To: <20030121185208.A82EB2A7EA@canning.wemm.org> References: Organization: MIT Laboratory for Computer Science Cc: arch@FreeBSD.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20030121185208.A82EB2A7EA@canning.wemm.org>, Peter Wemm quoted Robert Watson who said: >> (3) DTYPE_MEMFD >> Handle the implementation using a special file descriptor type >> creating using a special creation primitive (similar to kqueue, >> pipe, etc). >(3) is cleaner but requires a more code to add the DTYPE_xxxFD stuff and >affects more places in the kernel where we switch() on fd types. I >personally prefer (3) (3) is certainly closer to what the designers of the POSIX IPC interface were thinking. It has the significant benefit of not creating any additional kernel namespaces (which I think we would all agree was one of the worst mistakes in the SVR3 IPC model). Given (3), the implementation of shm_open() and shm_unlink() should move into the kernel, and those functions (rather than a special-purpose system call) should be used to provide this interface. shm_open() effectively looks like this: - examine first byte of path parameter - if c == '/' return open(...) - copy in path - use path to find/create shm object - create file descriptor a la open() with DTYPE_SHM We will need to find a spare bit in struct stat so that fstat() on one of these descriptors can indicate to S_TYPEISSHM() what it is. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message