Date: Wed, 18 Apr 2001 10:02:04 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Robert Watson <rwatson@FreeBSD.ORG>, Kirk McKusick <mckusick@mckusick.com>, Julian Elischer <julian@elischer.org>, Rik van Riel <riel@conectiva.com.br>, freebsd-hackers@FreeBSD.ORG, David Xu <bsddiy@21cn.com> Subject: Re: vm balance Message-ID: <200104181702.f3IH24s23282@earth.backplane.com> References: <38778.987605692@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
If this will get rid of or clean up the specfs garbage, then I'm all for it. I would love to see a 'clean' fileops based device interface. -Matt :I have not examined the full details of doing the shift yet, but it is :my impression that it actually will reduce the amount of code :duplication and special casing. : :Basically we will need a new: : : struct fileops devfileops = { : dev_read, : dev_write,, : dev_ioctl, : dev_poll, : dev_kqfilter, : dev_stat, : dev_close : }; : :The only places we will need new magic is : open, which needs to fix the plumbing for us. : mmap, which may have to be added to the fileops vector. : :The amount of special-casing code this would remove from the vnode :layer is rather astonishing. : :If we merger vm-objects and vnodes without taking devices out of the :mix, we will need even more special-case code for devices. : :>The vnode is our abstraction for objects that have :>address spaces, can be opened/closed and retain a seeking position, can be :>mapped, have protections, etc, etc. : :This is simply not correct Robert, UNIX::sockets also have many of :those properties, but they're not vnodes... : :>Besides which, :>the kernel knows how to act on vnodes, and there is plenty of precedent :>for the kernel opening vnodes and keeping around references for its own :>ends, but there isn't all that much precedent for the kernel doing this :>using file descriptors :-). : :Have you actually examined how FIFO and Sockets work Robert ? :-) : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 :phk@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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104181702.f3IH24s23282>