From 473d67de220ad6bc595d1f1e30a9359ba933eeda Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 24 Jun 2009 01:34:33 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=17197 o=tom.wang (wangdi) i=adilger i=johann Fix for detecting read-ahead problem. --- lustre/llite/rw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 087169b..4c75139 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -555,7 +555,7 @@ static inline int llap_shrink_cache_internal(struct ll_sb_info *sbi, int keep; if (unlikely(need_resched())) { - list_del(&dummy_llap.llap_pglist_item); + list_del(&dummy_llap.llap_pglist_item); ll_pglist_cpu_unlock(sbi, cpu); /* vmscan::shrink_slab() have own schedule() */ return count; @@ -1904,11 +1904,15 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode, if (zero) { /* check whether it is in stride I/O mode*/ if (!index_in_stride_window(index, ras, inode)) { + if (ras->ras_consecutive_stride_requests++ == 0) + ras_update_stride_detector(ras, index); + else + ras_stride_reset(ras); ras_reset(ras, index); ras->ras_consecutive_pages++; - ras_stride_reset(ras); GOTO(out_unlock, 0); } else { + ras->ras_consecutive_pages = 0; ras->ras_consecutive_requests = 0; if (++ras->ras_consecutive_stride_requests > 1) stride_detect = 1; -- 1.8.3.1