Re: New Feature Idea: Compress swap file

Emil Briggs (
Mon, 23 Feb 1998 23:41:44 -0500 (EST)

>On Sun, 22 Feb 1998, Lars Marowsky-Bree wrote:
>> On 1998-02-22T13:14:07,
>> Emil Briggs <> said:
>> > I don't know for certain but it sounds reasonable. Which brings to mind
>> > another question -- do the buffer flushing routines consider hard disk
>> > geometry when deciding which dirty buffers to write to disk and in what
>> > order to write them? (I'm not referring to swap specifically here).
>> Since the real geometry isn't known to the driver, this would be a useless
>> thing to try.
>An ext2 like approximation would work however. Or just
>queueing up _everything_ at once for writing and have
>the lowlevel drivers do the work, but that might generate
>too much I/O at once.

I want to try implementing something to optimize the way the
blocks are written to disk. As a start I thought I would try to
profile the way they are written now so I tracked the block
numbers (b_blocknr) being written in bdflush from the
bufferhead structure. Under a heavy load of disk writes the
block numbers are bouncing all over the place so if the block
numbers do have some correlation with the disk geometry then
I don't think the writes are being done very efficiently.

I'm not sure though how to check how good the correlation is,
particularly since the drive firmware might be doing some
sort of geometry translation as well.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to