[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080107124952.GA8201@lazybastard.org>
Date: Mon, 7 Jan 2008 13:49:52 +0100
From: Jörn Engel <joern@...fs.org>
To: Frantisek Rysanek <Frantisek.Rysanek@...t.cz>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [noob q. on block layer] block IO read-ahead during sequential *write*?
On Mon, 7 January 2008 13:25:09 +0100, Frantisek Rysanek wrote:
>
> let me start with a simple example. The following commands:
>
> cp /dev/zero /dev/hda
> dd if=/dev/zero of=/dev/hda [bs=512]
>
> both have one common side-effect: apart from the disk being properly
> overwritten with zeroes, the kernel seems to keep reading sectors
> ahead of the current seek position of the sequential write.
Block devices are cached in the page cache. If you write less than a
full page, any remainder has to be read from the device.
If you retry the dd with bs=4096 (or whatever your architecture's page
size happens to be), does this still occur?
Jörn
--
Chance favors only the prepared mind.
-- Louis Pasteur
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists