Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbcKGB6E (ORCPT ); Sun, 6 Nov 2016 20:58:04 -0500 Received: from casper.infradead.org ([85.118.1.10]:56876 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751948AbcKGB5z (ORCPT ); Sun, 6 Nov 2016 20:57:55 -0500 Date: Mon, 7 Nov 2016 01:57:52 +0000 (GMT) From: James Simmons To: Oleg Drokin cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List , Bobi Jam Subject: Re: [PATCH 12/14] staging/lustre/llite: update ras window correctly In-Reply-To: <1478136304-867780-13-git-send-email-green@linuxhacker.ru> Message-ID: References: <1478136304-867780-1-git-send-email-green@linuxhacker.ru> <1478136304-867780-13-git-send-email-green@linuxhacker.ru> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161107_015752_987927_54407F5E X-CRM114-Status: GOOD ( 20.22 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2141 Lines: 56 > From: Bobi Jam > > When stride-RA hit case miss, we only reset normal sequential > read-ahead window, but not reset the stride IO to avoid the overhead > of re-detecting stride IO. While when the normal RA window is set > to not insect with the stride-RA window, when we try to increase > the stride-RA window length later, the presumption does not hold. > > This patch resets the stride IO as well in this case. Reviewed-by: James Simmons > Signed-off-by: Bobi Jam > Reviewed-on: http://review.whamcloud.com/23032 > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8683 > Reviewed-by: wangdi > Reviewed-by: Jinshan Xiong > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/llite/rw.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c > index d2515a8..e34017d 100644 > --- a/drivers/staging/lustre/lustre/llite/rw.c > +++ b/drivers/staging/lustre/lustre/llite/rw.c > @@ -809,13 +809,20 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode, > if (ra_miss) { > if (index_in_stride_window(ras, index) && > stride_io_mode(ras)) { > - /*If stride-RA hit cache miss, the stride dector > - *will not be reset to avoid the overhead of > - *redetecting read-ahead mode > - */ > if (index != ras->ras_last_readpage + 1) > ras->ras_consecutive_pages = 0; > ras_reset(inode, ras, index); > + > + /* If stride-RA hit cache miss, the stride > + * detector will not be reset to avoid the > + * overhead of redetecting read-ahead mode, > + * but on the condition that the stride window > + * is still intersect with normal sequential > + * read-ahead window. > + */ > + if (ras->ras_window_start < > + ras->ras_stride_offset) > + ras_stride_reset(ras); > RAS_CDEBUG(ras); > } else { > /* Reset both stride window and normal RA > -- > 2.7.4 > >