From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 13 17:50:26 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 5227B16A41C; Mon, 13 Jun 2005 17:50:26 +0000 (GMT) (envelope-from julian@elischer.org) Received: from bigwoop.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2753743D55; Mon, 13 Jun 2005 17:50:26 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by bigwoop.vicor-nb.com (Postfix) with ESMTP id 111BD7A403; Mon, 13 Jun 2005 10:50:26 -0700 (PDT) Message-ID: <42ADC762.6010801@elischer.org> Date: Mon, 13 Jun 2005 10:50:26 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050423 X-Accept-Language: en, hu MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Apache Xie 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 17:50:26 -0000 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 :-)