From 5c1877c4143bddcd3c5c4f2397db5622c2116fce Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 3 May 2016 23:29:42 -0600 Subject: [PATCH] LU-7990 llite: increase whole-file readahead to RPC size Increase the default whole-file readahead limit to match the current RPC size. That ensures that files smaller than the RPC size will be read in a single round-trip instead of sending multiple smaller RPCs. Lustre-change: https://review.whamcloud.com/26955 Lustre-commit: 627d0133d9d7bef908544537a8a2b2093719fc72 Signed-off-by: Andreas Dilger Change-Id: I3bdb1c7f92c546d58951a9e6b783af23c83ebbe5 Reviewed-by: Patrick Farrell Reviewed-by: Dmitry Eremin Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/29738 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/llite/llite_lib.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index ba305aa..0824fa2 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -99,8 +99,7 @@ static struct ll_sb_info *ll_init_sbi(void) sbi->ll_ra_info.ra_max_pages_per_file = min(pages / 32, SBI_DEFAULT_READAHEAD_MAX); sbi->ll_ra_info.ra_max_pages = sbi->ll_ra_info.ra_max_pages_per_file; - sbi->ll_ra_info.ra_max_read_ahead_whole_pages = - SBI_DEFAULT_READAHEAD_WHOLE_MAX; + sbi->ll_ra_info.ra_max_read_ahead_whole_pages = -1; ll_generate_random_uuid(uuid); class_uuid_unparse(uuid, &sbi->ll_sb_uuid); @@ -449,6 +448,12 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, sbi->ll_dt_exp->exp_connect_data = *data; + /* Don't change value if it was specified in the config log */ + if (sbi->ll_ra_info.ra_max_read_ahead_whole_pages == -1) + sbi->ll_ra_info.ra_max_read_ahead_whole_pages = + max_t(unsigned long, SBI_DEFAULT_READAHEAD_WHOLE_MAX, + (data->ocd_brw_size >> PAGE_SHIFT)); + err = obd_fid_init(sbi->ll_dt_exp->exp_obd, sbi->ll_dt_exp, LUSTRE_SEQ_METADATA); if (err) { -- 1.8.3.1