Date: Sun, 19 Sep 1999 00:48:41 -0700 From: David Greenman <dg@root.com> To: Greg Lehey <grog@lemis.com> Cc: Matt Dillon <dillon@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: User block device access (was: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys vnode.h src/sys/kern vfs_subr.c) Message-ID: <199909190748.AAA20860@implode.root.com> In-Reply-To: Your message of "Sun, 19 Sep 1999 10:50:46 %2B0930." <19990919105045.T55065@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>On Thursday, 16 September 1999 at 23:10:28 -0700, Matt Dillon wrote: >> dillon 1999/09/16 23:10:28 PDT >> >> Modified files: >> sys/miscfs/specfs spec_vnops.c >> sys/sys vnode.h >> sys/kern vfs_subr.c >> Log: >> Add vfs.enable_userblk_io sysctl to control whether user reads and writes >> to buffered block devices are allowed. The default is to be backwards >> compatible, i.e. reads and writes are allowed. >> >> The idea is for a larger crowd to start running with this disabled and >> see what problems, if any, crop up, and then to change the default to >> off and see if any problems crop up in the next 6 months prior to >> potentially removing support entirely. There are still a few people, >> Julian and myself included, who believe the buffered block device >> access from usermode to be useful. > >Add me to that list. What reasons have been given for disabling it? Well, for one thing, the block-buffered device existed originally because it was the mechanism that the system used to cache filesystem data. In 4.4BSD this is no longer the way it works (caching is file based), so its original purpose of existing is gone now. Second, support for device based caching causes a lot of internal problems with buffer aliasing/cache coherency whenever someone opens the device and starts using it when the underlying filesystem is also mounted. Third, since writes to buffered devices are asynchronous, there is no way to know when/if you get an I/O error (e.g. floppies or other removable media), so the most common use of the device is much better served by using the character device. The general feeling of both myself and Kirk McKusick is that the blocking/ buffering should be done at the application level and not by the kernel and that the block/buffered device should go away. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org Creator of high-performance Internet servers - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909190748.AAA20860>