From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755140Ab0BXDNW (ORCPT ); Tue, 23 Feb 2010 22:13:22 -0500 Received: from mga02.intel.com ([134.134.136.20]:29684 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755114Ab0BXDNK (ORCPT ); Tue, 23 Feb 2010 22:13:10 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,529,1262592000"; d="scan'208";a="598621487" Message-Id: <20100224031055.594006457@intel.com> User-Agent: quilt/0.48-1 Date: Wed, 24 Feb 2010 11:10:15 +0800 From: Wu Fengguang To: Andrew Morton CC: Jens Axboe , Nick Piggin , 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 14/15] readahead: reduce MMAP_LOTSAMISS for mmap read-around References: <20100224031001.026464755@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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 14/15] readahead: reduce MMAP_LOTSAMISS for mmap read-around Date: Wed, 24 Feb 2010 11:10:15 +0800 Message-ID: <20100224031055.594006457@intel.com> References: <20100224031001.026464755@intel.com> Cc: Jens Axboe , Nick Piggin , Wu Fengguang To: Andrew Morton Return-path: 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 Content-Disposition: inline; filename=readahead-mmap-around.patch Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.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 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 -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 14/15] readahead: reduce MMAP_LOTSAMISS for mmap read-around Date: Wed, 24 Feb 2010 11:10:15 +0800 Message-ID: <20100224031055.594006457@intel.com> References: <20100224031001.026464755@intel.com> Return-path: Received: from kanga.kvack.org ([205.233.56.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nk7gd-0006ZQ-4U for glkm-linux-mm-2@m.gmane.org; Wed, 24 Feb 2010 04:13:19 +0100 Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with SMTP id A94B86B0092 for ; Tue, 23 Feb 2010 22:13:09 -0500 (EST) Content-Disposition: inline; filename=readahead-mmap-around.patch Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Jens Axboe , Nick Piggin , Wu Fengguang , Chris Mason , Peter Zijlstra , Clemens Ladisch , Olivier Galibert , Vivek Goyal , Christian Ehrhardt , Matt Mackall , Linux Memory Management List , linux-fsdevel@vger.kernel.org, LKML List-Id: linux-mm.kvack.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 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 -- 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