From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 13 18:45:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7B2916A41C; Mon, 13 Jun 2005 18:45:55 +0000 (GMT) (envelope-from SRS0+0b851353296582aa3a45+659+infradead.org+hch@pentafluge.srs.infradead.org) Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 547BB43D53; Mon, 13 Jun 2005 18:45:55 +0000 (GMT) (envelope-from SRS0+0b851353296582aa3a45+659+infradead.org+hch@pentafluge.srs.infradead.org) Received: from hch by pentafluge.infradead.org with local (Exim 4.43 #1 (Red Hat Linux)) id 1DhtwV-00010x-IX; Mon, 13 Jun 2005 19:45:51 +0100 Date: Mon, 13 Jun 2005 19:45:51 +0100 From: Christoph Hellwig To: Scott Long Message-ID: <20050613184551.GA3853@infradead.org> References: <42ADC762.6010801@elischer.org> <20050613181435.GA3096@infradead.org> <42ADD253.4020606@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42ADD253.4020606@samsco.org> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Cc: Daniel Eischen , Julian Elischer , Apache Xie , freebsd-hackers@freebsd.org Subject: Re: contigmalloc() and mmap() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2005 18:45:55 -0000 On Mon, Jun 13, 2005 at 12:37:07PM -0600, Scott Long wrote: > How does linux handle the implications of fork(2) in this scenario? it's still counted as the same instance. Similar for dup or passing descriptors over AF_UNIX sockets. The data is explictly not per-process but per instance. There's not a lot of users actually using this feature, only the tty subsystem and multi-channel sound drivers for the old oss API that allowed multiple opens of /dev/dsp that way come to mind. Lot's of driver use file->private to get at per-device data easily, but that's just a shortcut.