X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Frw.c;h=c8b0626ce1de5c8e8491ab7dc73e178f441e4ff8;hp=cbd1c919104c60fa0cde3cd266339fa392388acb;hb=b8e8dcb521e6232c4c16eaac1aa3b38c1cbcc59f;hpb=20b3c42dfca56b79b891cb290768b2c9ace80d0b diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index cbd1c91..c8b0626 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -576,7 +576,13 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io, * know what the actual RPC size is. If this needs to change, it makes more * sense to tune the i_blkbits value for the file based on the OSTs it is * striped over, rather than having a constant value for all files here. */ -#define RAS_INCREASE_STEP(inode) (1UL << inode->i_blkbits) + +/* RAS_INCREASE_STEP should be (1UL << (inode->i_blkbits - CFS_PAGE_SHIFT)). + * Temprarily set RAS_INCREASE_STEP to 1MB. After 4MB RPC is enabled + * by default, this should be adjusted corresponding with max_read_ahead_mb + * and max_read_ahead_per_file_mb otherwise the readahead budget can be used + * up quickly which will affect read performance siginificantly. See LU-2816 */ +#define RAS_INCREASE_STEP(inode) (ONE_MB_BRW_SIZE >> CFS_PAGE_SHIFT) static inline int stride_io_mode(struct ll_readahead_state *ras) {