Date: Wed, 18 Apr 2001 20:49:20 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Matt Dillon <dillon@earth.backplane.com> Cc: Julian Elischer <julian@elischer.org>, Robert Watson <rwatson@FreeBSD.ORG>, Kirk McKusick <mckusick@mckusick.com>, Rik van Riel <riel@conectiva.com.br>, freebsd-hackers@FreeBSD.ORG, David Xu <bsddiy@21cn.com> Subject: Re: vm balance Message-ID: <42319.987619760@critter> In-Reply-To: Your message of "Wed, 18 Apr 2001 10:56:01 PDT." <200104181756.f3IHu1D25098@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200104181756.f3IHu1D25098@earth.backplane.com>, Matt Dillon writes: > >:You can mmap() devices and you can mmap files.. >: >:you cannot mmap FIFOs or sockets. >: >:for this reason I think that devices are still well represented by >:vnodes. If we merged vnodes and vm objects, >:then if devices were not vnodes, how would you represent >:a vm area that maps a device? >: >:-- >: __--_|\ Julian Elischer > > I think the crux of the issue here is that most devices just don't > need the baggage of a vnode and many don't need the baggage of a VM > object except possibly for mmap(). A fileops interface would be the > cleanest way to implement a wide range of devices. > > Lets compare our various function dispatch structures. It's quite > obvious to me that we can merge cdevsw and fileops and remove all > vnode references from most of our devices. Ok, maybe not /dev/tty... > but most of the rest surely! We would also want to have an optional > vnode pointer in the fileops (like we do now) which 'enables' the > additional VOP operations on that file descriptor (in this case the > fileops for read, write, etc... would point to VOP wrappers like they > do now), and of course we would need an opaque pointer for use by > the fileops (devices would most likely load their cdev reference into > it). Right on. I think your table is wrong for "REVOKE", there is TTY magic in that. The fact that we have aliased vnodes for devices and for nothing else. The fact that all devices are handled by a magic filesystem (specfs) in the same "orphan" mode by all filesystems which support devices is another good reason. I think I'll kick back tonight and try to see what it actually takes to do it... -- 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?42319.987619760>