Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 1996 11:58:42 -0700 (PDT)
From:      Julian Elischer <julian@ref.tfs.com>
To:        hackers@FreeBSD.org
Subject:   devfs policy question.
Message-ID:  <199604261858.LAA27576@ref.tfs.com>

next in thread | raw e-mail | index | archive | help

Here is policy question number one...

What should devfs do to a device that is open when
the driver requests that it be deleted?

e.g.

what should happen to the vnode for /devfs/rsd1s1d if the slice code
decides that that device makes no sense any more, but there is a reference
because a preocess somewhere has it open.. (what if it's mounted?)?

At the moment a vgone() is done on the vnode.
is this right?

It is dissociated from devfs and vgone (well vclean actually)
associates it with the deadfs vnops.

Is this the right thing to do?

---------------

Policy question number two
should devfs allow the creation of fifo/named pipes?
I tend to think yes.... they are dynamic and kinda-like devices

---------------

Policy question number three
When returning a vnode from devfs_lookup()
an attempt is made to see if that node already has a vnode associated
with it, and if it is not in use, it adds a reference and resurects it.
This means that if you have 100 devices, there are 100 vnodes sitting around
waiting to be reused. Very few of these would be actually re-used for devices..

Should the devfs try re-use the same vnode (or a small pool of vnodes)
again and again for different devices,
to avoid thrashing the vnode cache? If so, does
anyone have any ideas about how it can know that the vnode that i just
gave away with a lookup() is no-longer referenced and can be re-used
straight away? (rather than going asking for another...
Devfs vnodes want to be put at the end of the LRU Queue, as they can
be recreated very quickly (unless there are aliases).


julian



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