Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2005 10:50:26 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Apache Xie <apachexm@hotmail.com>
Subject:   Re: contigmalloc() and mmap()
Message-ID:  <42ADC762.6010801@elischer.org>
In-Reply-To: <Pine.GSO.4.43.0506131332380.23852-100000@sea.ntplx.net>
References:  <Pine.GSO.4.43.0506131332380.23852-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help


Daniel Eischen wrote:

>On Mon, 13 Jun 2005, Julian Elischer wrote:
>  
>
>>Maybe I don't understand the problem but..
>>
>>I think the problem is that you want to keep a separate buffer for each
>>user, 
>>while the drivers you are looking at expect to have only one buffer per
>>device.
>>
>>One answer to this would be to make each user open a different 'instance'
>>of the device.  (i.e. a differnt minor number). otherwise there is no
>>really good place to store the information.
>>The device does not track users as such and even if it did, how would it
>>track when a user process forks and becomes 2? it is not notified of this
>>event.
>>    
>>
>
>Is he looking for something like this in FreeBSD?
>
>  http://docs.sun.com/app/docs/doc/802-5900/6i9kj7or8?a=view
>  
>

Intersting, but no, I don't thionk that is what he is looking for.

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.

anyhow I may be wrong. I'll go read it again :-)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42ADC762.6010801>