Subject: Re: 32 bit dev_t, Revision 2
To: Todd Vierling <tv@NetBSD.ORG>
From: Chris G. Demetriou <>
List: tech-kern
Date: 01/11/1998 17:03:20
> On Sun, 11 Jan 1998, Chris G. Demetriou wrote:
> : > The split makes checking for them easier (via bit-tests).
> : 
> : How does using the high bits specially make _anything_ -- the code,
> : the understanding of the allocation, anything -- easier?
> : 
> : Nothing's easier than direct table lookup with a value.
> Well, we'd still be doing table lookup.  Just one out of two tables.

Perhaps you don't understand.

Direct lookup means:

Not direct lookup means:
	pick devsw
	get right bits from major to index into that devsw
	look up in that devsw

That's not direct.  And every place that looks things up in the
device table would need to be changed, adding complexity (possibly not
directly in source code, if you macroize it, but defintitely present
in object code.)

> : Splitting that into two tables and using macros to test, etc., isn't
> : "easier," it's more complex.
> Okay, so does this mean we want one table?

One "active" table, i.e. one table in the running kernel, yes.

I don't care too much if it's "one table for the whole system," or
"one table per ${MACHINE_ARCH}".

If nobody wants to argue about which of the latter choices it should
be, then I say let's go for "one table for the whle system," because
that would reduce some maintenance hassles a bit.