Re: The reason to call it 3.0 is the desktop (was Re: [OT] 2.6 not 3.0 - (NUMA))

Linus Torvalds
2002-10-07T19:32:32Z

On Mon, 7 Oct 2002, Daniel Phillips wrote:
>
> Ext2 likes to spread directory inodes around the volume so that there is
> room to keep the associated file blocks nearby. This interacts rather
> poorly with readahead.

Not a read-ahead problem. It interacts rather poory _full_stop_.

It means that the inode tables are spread all out, the bitmaps are
fragmented etc, so the disk head has to move all over the disk even when
only working with one directory tree like the kernel sources.

Kernel-level read-ahead doens't much help, because the FS tries to keep
the data blocks for individual files together - which is the case the
kernel _can_ try to optimize a bit. Physical read-ahead doesn't work
either, since the parts that can be physically read ahead are the ones
that the regular in-file read-ahead already mostly takes care of it.

So the problem with spreading stuff out doesn't have anything to do with
read-ahead, and has everything to do with the basic issue of BAD LOCALITY.
Locality is _good_, independently of read-ahead and independently of
medium.

Locality helps regardless of any read-ahead, although it is clearly true
that bad locality makes readahead more futile.

Linus