Subject: Re: fdesc
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-kern
Date: 02/29/1996 15:34:02
>> I agree with the basic idea here.  For all that it has problems,
>> fdesc for /dev/fd is a whole lot better than making /dev/fd a
>> regular directory populated with major-24 special devices.

> I hate to revive this topic, but in all the discussion to date I've
> not seen any justification for this.  Why do you say that a special
> virtual filesystem would be in some way "better" than a regular set
> of device files in the standard root filesystem?

Two reasons.

1) fdesc provides exactly and only those entries that actually
   correspond to open file descriptors for the accessing process.  If
   you populate a directory with special device files, you have to put
   hundreds of them there, as many as the kernel supports open files,
   and then update it whenever that limit rises.

   fdesc always gets it right.

2) The fdesc entries stat as what they are.  Character special devices
   always stat as character special devices.

I consider the former to be more compelling; the latter is just a nice
frill to me.

> To me fdesc appears to be a nifty excercise but a waste of overhead.

Then leave it out of your kernel, and the only overhead will be a
little time taken by its maintenance, and that by people who think it's
worth maintaining.  What's the problem?

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu