SongT.L <songtao_l@hotmail.com> wrote:> I have a new question about lustre.
> In the func ll_start_readahead( llite/rw.c), the variable end_index is
> assigned to
> first_index+(inode->iblksize>>(PAGE_CACHE_SHIFT-3)).
> Why use this value? What is the difference in readahead strategy between
> lustre and standard linux?
With Lustre the i_blksize value is a multiple of the RPC size and the number
of OSTs a file is striped over, so it is a good size for readahead. The
standard Linux VM readahead is not large enough for Lustre to get optimal
read performance on high-speed networks.
The reason Lustre uses its own readahead is because the VM readahead does
not know about Lustre locking and sometimes tries to read pages that are
outside the file regions that have locks on the client.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/