From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754673Ab0CAFiv (ORCPT ); Mon, 1 Mar 2010 00:38:51 -0500 Received: from mga09.intel.com ([134.134.136.24]:36351 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650Ab0CAFh7 (ORCPT ); Mon, 1 Mar 2010 00:37:59 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,557,1262592000"; d="scan'208";a="600016153" Message-Id: <20100301053622.369159359@intel.com> User-Agent: quilt/0.48-1 Date: Mon, 01 Mar 2010 13:27:06 +0800 From: Wu Fengguang To: Andrew Morton CC: Jens Axboe , Nick Piggin , Rik van Riel , Wu Fengguang CC: Chris Mason CC: Peter Zijlstra CC: Clemens Ladisch CC: Olivier Galibert cc: Vivek Goyal cc: Christian Ehrhardt cc: Matt Mackall cc: Linux Memory Management List CC: Cc: LKML Subject: [PATCH 15/16] readahead: reduce MMAP_LOTSAMISS for mmap read-around References: <20100301052651.857984880@intel.com> Content-Disposition: inline; filename=readahead-mmap-around.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we lifts readahead size from 128KB to 512KB, the MMAP_LOTSAMISS shall be shrinked accordingly. We shrink it a bit more, so that for sparse random access patterns, only 10*512KB or ~5MB memory will be wasted, instead of the previous 100*128KB or ~12MB. The new threshold "10" is still big enough to avoid turning off read-around for typical executable/lib page faults. CC: Nick Piggin Acked-by: Rik van Riel Signed-off-by: Wu Fengguang --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux.orig/mm/filemap.c 2010-02-21 23:56:22.000000000 +0800 +++ linux/mm/filemap.c 2010-02-21 23:56:26.000000000 +0800 @@ -1393,7 +1393,7 @@ static int page_cache_read(struct file * return ret; } -#define MMAP_LOTSAMISS (100) +#define MMAP_LOTSAMISS (10) /* * Synchronous readahead happens when we don't even find