From owner-freebsd-hackers Thu Dec 18 04:17:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA13592 for hackers-outgoing; Thu, 18 Dec 1997 04:17:47 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from cheops.anu.edu.au (avalon@cheops.anu.edu.au [150.203.76.24]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA13580 for ; Thu, 18 Dec 1997 04:17:34 -0800 (PST) (envelope-from avalon@coombs.anu.edu.au) Message-Id: <199712181217.EAA13580@hub.freebsd.org> Received: by cheops.anu.edu.au (1.37.109.16/16.2) id AA233727408; Thu, 18 Dec 1997 23:16:48 +1100 From: Darren Reed Subject: Re: converting drivers to dynamic memory... To: gurney_j@resnet.uoregon.edu Date: Thu, 18 Dec 1997 23:16:48 +1100 (EDT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <19971218035032.46460@hydrogen.nike.efn.org> from "John-Mark Gurney" at Dec 18, 97 03:50:32 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In some mail from John-Mark Gurney, sie said: > > well... one of the things that will need to be done in preperation > for moving to a dynamic system which will be required by the bus/device > code, we will need to eliminate ALL static datat that depends upon > Ndevice to size itself. > > There are two ways that we can fix this problem. The first (and > technically the best) is to be extend many of the calling functions > to pass around a void * pointer that will point to that devices > resources. Though this is technically best, it will require that > most major parts of the kernel be significantly changes. > > The second solution is to continue to use the major/minor code scheme, > but use a binary tree or a B-tree to obtain the private data. This > can cause a performance impact if we use if for things like the sio, > but this can be fixed by changing the interrupt interface. > I think that we should go with the second solution as it will be > initalially easier to do. I have B-tree code already writen, (I was > writing it for another use in my bus/device code) which we could use > to access this information. (Some people will say, why not linked > lists, and then I will say, sio, I have 12 ports on my term server, > plus you get better data density) I guess the question is, do you want a `quick hack' or a real solution to fix and addres the problem ? How many hours did you spend on the B-Tree stuff and how many do you expect it would take to do it the other way ? "Do it once and do it right."