From owner-freebsd-hackers Wed Apr 18 10: 2:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id F2F8F37B422; Wed, 18 Apr 2001 10:02:17 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.2/8.11.2) id f3IH24s23282; Wed, 18 Apr 2001 10:02:04 -0700 (PDT) (envelope-from dillon) Date: Wed, 18 Apr 2001 10:02:04 -0700 (PDT) From: Matt Dillon Message-Id: <200104181702.f3IH24s23282@earth.backplane.com> To: Poul-Henning Kamp Cc: Robert Watson , Kirk McKusick , Julian Elischer , Rik van Riel , freebsd-hackers@FreeBSD.ORG, David Xu Subject: Re: vm balance References: <38778.987605692@critter> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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