Date: Mon, 13 Jun 2005 12:37:07 -0600 From: Scott Long <scottl@samsco.org> To: Christoph Hellwig <hch@infradead.org> Cc: Daniel Eischen <deischen@freebsd.org>, freebsd-hackers@freebsd.org, Julian Elischer <julian@elischer.org>, Apache Xie <apachexm@hotmail.com> Subject: Re: contigmalloc() and mmap() Message-ID: <42ADD253.4020606@samsco.org> In-Reply-To: <20050613181435.GA3096@infradead.org> References: <Pine.GSO.4.43.0506131332380.23852-100000@sea.ntplx.net> <42ADC762.6010801@elischer.org> <20050613181435.GA3096@infradead.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Christoph Hellwig wrote: > On Mon, Jun 13, 2005 at 10:50:26AM -0700, Julian Elischer wrote: > >>Several times in the past we've seen people complainign that Linux >>allows a device driver to know >>who called it and somehow it seems to store somewhere some information >>about who >>openned the device.. thos somehow allows linux to store an arbitrary >>structure >>for each openning process. I thin from the sond of it that he wants to >>do something >>similar. From the sond of it he wants to have a different buffer be used >>depending on >>who is calling. This would partly work but would not work when processes >>fork etc. >> >>I think Linux must do some extra housekeeping in this case. > > > What Linux does is pretty simple. The driver has access to the file > structure, and this structure has a field for driver private data. > It can store private data in open and free it again in the release > callback. > How does linux handle the implications of fork(2) in this scenario? Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42ADD253.4020606>