From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 08/14] readahead: remove one unnecessary radix tree lookup Date: Tue, 07 Apr 2009 15:17:37 +0800 Message-ID: <20090407072133.639831916@intel.com> References: <20090407071729.233579162@intel.com> Cc: Ying Han , LKML , , , Wu Fengguang To: Andrew Morton Return-path: Content-Disposition: inline; filename=readahead-interleaved-offset.patch Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org (hit_readahead_marker != 0) means the page at @offset is present, so we can search for non-present page starting from @offset+1. Reported-by: Xu Chenfeng Signed-off-by: Wu Fengguang --- mm/readahead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- mm.orig/mm/readahead.c +++ mm/mm/readahead.c @@ -420,7 +420,7 @@ ondemand_readahead(struct address_space pgoff_t start; rcu_read_lock(); - start = radix_tree_next_hole(&mapping->page_tree, offset,max+1); + start = radix_tree_next_hole(&mapping->page_tree, offset+1,max); rcu_read_unlock(); if (!start || start - offset > max) -- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org