Request for PTY/devfs changes
Poul-Henning Kamp
phk at phk.freebsd.dk
Mon Jan 8 11:29:07 PST 2007
In message <200701081119.39163.jhb at freebsd.org>, John Baldwin writes:
>On Saturday 06 January 2007 16:36, Ed Schouten wrote:
>devfs doesn't seem to handle any of this for you at all, forcing each bit
>of code that uses dev_clone to manage all this itself. :( When a device
>is opened you can mark it as opened. Perhaps you can have a callout that
>periodically checks to see if there are any "orphans" created due to a
>stat() and if so schedule a task on a taskqueue to purge them. I need to
>figure out something sane for /dev/ipmi0 before I can turn on cloning
>there myself.
If the device is entirely virtual, like pty, the driver should not
allocate any state until open happens and the cdev should be marked
with CHEAP_CLONE.
In that case the cdev gets recycled quite fast if unreferenced.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list