Date: Wed, 05 Nov 2008 00:46:52 +0100 From: "Ronald Klop" <ronald-freebsd8@klop.yi.org> To: "Scott Long" <scottl@samsco.org>, "Patrick M. Hausen" <hausen@punkt.de> Cc: stable@freebsd.org, d_elbracht <d_elbracht@ecngs.de> Subject: Re: Block device Message-ID: <op.uj4ccekf8527sy@82-170-177-25.ip.telfort.nl> In-Reply-To: <49107933.7070907@samsco.org> References: <d3ea75b30811040612g3ba10a8fuf5551b730176acc2@mail.gmail.com> <004901c93e8a$1b556500$639049d9@EC1a> <20081104145144.GB14539@hugo10.ka.punkt.de> <49107933.7070907@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 04 Nov 2008 17:32:51 +0100, Scott Long <scottl@samsco.org> wrote: > Patrick M. Hausen wrote: >> h, all, >> On Tue, Nov 04, 2008 at 03:32:01PM +0100, d_elbracht wrote: >>> Hi list, >>> >>> can someone please explain, why stat -x /dev/da1 >>> >>> show the SCSI-Drive as a character-device ? >> >> http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html >> > > Wow that's a confusing and misleading article. > > 1. disk access in the driver layer still happens on a block basis. It's > true that to the application layer, the device has character dev > semantics, meaning that arbitrary numbers of bytes can be accessed > randomly without any restrictions. But deep down inside the kernel, > it's still doing block-by-block access. > > 2. caching still happens at the filesystem level. Doing I/O directly to > /dev/daX or adX or whatever will not be cached/buffered, but doing I/O > to a file on any of these devices will. > > 3. Cache coherency between the block and character device > representations was indeed an issue, but removing the block/cached > representation was really a matter of policy over tools, and it's > one reason why FreeBSD gets creamed in the silly-io-benchmarch > department. > > 4. However, in the not-so-silly-io-benchmark department, I think FreeBSD > does a whole lot better because you don't have the blind caching of the > block device trying to out-guess what the filesystem is trying to do. > > Scott This explains some things to me as a simple user reading the linked article. I'm not a kernel programmer, but do understand computers and this article made me wonder if I missed something last years about disks and caches. Ronald.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.uj4ccekf8527sy>