Date: Thu, 4 Aug 2005 10:02:51 +0400 From: Andrey Chernov <ache@FreeBSD.ORG> To: Maxim.Sobolev@portaone.com Cc: Dan Nelson <dnelson@allantgroup.com>, "current@freebsd.org" <current@FreeBSD.ORG> Subject: Re: Sub-optimal libc's read-ahead buffering behaviour Message-ID: <20050804060251.GA21228@nagual.pp.ru> In-Reply-To: <42F0E9B2.9080208@portaone.com> References: <42F0CCD5.9090200@portaone.com> <20050803150117.GD93405@dan.emsphone.com> <42F0E9B2.9080208@portaone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 03, 2005 at 06:58:42PM +0300, Maxim Sobolev wrote: > Checking the actual code confirm your point, thank you! However, I think > that the current behaviour is at best inconsistent, since it in fact > does buffering of character devices in some cases but does not in some > others. In my example it reads 4096 bytes instead of requested 512 at > each request, but when the program does fseek it rejects part of that > buffer and does re-positioning and re-reading. Very confusing behaviour > IMHO. No surprize. Single read can be consider as sort of "atomic" operation. But between read & seek character device itself can move its pointer in anyplace. -- http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050804060251.GA21228>