Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 1997 09:01:36 -0600
From:      "Justin T. Gibbs" <gibbs@plutotech.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        gibbs@plutotech.com, current@FreeBSD.ORG, nate@mt.sri.com
Subject:   Re: cvs commit: src/sys/conf files src/sys/dev/vx if_vx.c if_vxreg.h src/sys/i386/apm apm.c src/sys/i386/conf GENERIC files.i386 src/sys/i386/eisa 3c5x9.c aha1742.c aic7770.c bt74x.c eisaconf.c eisaconf.h if_fea.c if_vx_eisa.c src/sys/i386/i386 autoconf.c ... 
Message-ID:  <199709221501.JAA16510@pluto.plutotech.com>
In-Reply-To: Your message of "Tue, 23 Sep 1997 00:40:34 %2B1000." <199709221440.AAA18001@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>Now make it scale during usage.  There are lots of schemes available, 
>>but very few are easily scalable by mallocing small chunks of free
>>memory.
>
>This one is: when attaching a drive, find a free drive number and malloc
>more storage if the new number is at the end.

How much storage do I need in order to realloc the arrays?  Is it bounded?

The current implementation only needs to allocate a callout at a time if
it wants to grow the number of callouts.  It may, in fact be nice to add
an interface for clients to add additional callouts if they are heavy
users of them.  For instance, the CAM system grows it's number of
transactions dynamically and will simply stop growing if it can't malloc
more.  In your scenario, if you can't allocate space for a drive and it's
transactions, you can't talk to the drive.

>The main point is that it is easy to build a perfect hash function
>(drive_number, transaction_number) -> timeout_slot_number because we
>only need one timeout per (drive_number, transaction_number).

I thought your point was that every client should make up their own
solution to this problem instead of making the generic solution more
efficient. 8-)

>Bruce

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================



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