Date: Fri, 7 Dec 2007 14:37:01 +0100 From: Bernd Walter <ticso@cicely12.cicely.de> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: readv: parallel or sequential? Message-ID: <20071207133700.GO10459@cicely12.cicely.de> In-Reply-To: <fjbh4h$f5s$1@ger.gmane.org> References: <fjbb3v$n60$1@ger.gmane.org> <ad79ad6b0712070347s4a5d5bb2rc7adfdc54b107dac@mail.gmail.com> <868x46u0lz.fsf@ds4.des.no> <fjbh4h$f5s$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 07, 2007 at 02:22:22PM +0100, Ivan Voras wrote: > Dag-Erling Smørgrav wrote: > > > But to return to what Ivan was asking, I think what the man page is > > trying to say is that you can't use readv() to e.g. read individual > > network packets into separate buffers (unless each packet just happens > > to fit exactly within each buffer). > > What about streaming protocols like TCP? If, for example, I know I have > a N-byte header, N2-byte body, couldn't readv handle it with two iovecs? > > But that's not why I started the discussion. I'm looking for a way to do > "scattered" async IO on files (the intention: feed an array of offsets, > lengths and buffers into the kernel, let it perform the requests in > parallel, if it can) and started with this man page. I wonder if the kernel can read a single file in parallel, because disk heads can't be on multiple positions at the same time. ZFS does fill read cache in parallel if it knowns that there are enough spindels, but in every other case the FS doesn't know about multiple spindels. In case of ZFS you don't have to care much about it in you application because the next sequentiel fileread will use the previously parallel prefilled cache. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071207133700.GO10459>