]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Sep 2012 00:19:42 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:03:28 +0000 (15:03 +1000)
tweak code comment

Cc: Hugh Dickins <hughd@google.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Shaohua Li <shli@fusionio.com>
Cc: Shaohua Li <shli@kernel.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/internal.h

index e4a205bdd8c010d38b553f92aae3ae889db77115..299aa10d63902cd020b48d86192419af9437fe02 100644 (file)
@@ -374,15 +374,12 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
 #define ALLOC_CMA              0x80 /* allow allocations from CMA areas */
 
 /*
- * Unnecessary readahead harms performance. 1. for SSD, big size read is more
- * expensive than small size read, so extra unnecessary read only has overhead.
- * For harddisk, this overhead doesn't exist. 2. unnecessary readahead will
- * allocate extra memroy, which further tights memory pressure, so more
- * swapout/swapin.
- * These adds a simple swap random access detection. In swap page fault, if
- * page is found in swap cache, decrease an account of vma, otherwise we need
- * do sync swapin and the account is increased. Optionally swapin will do
- * readahead if the counter is below a threshold.
+ * Unnecessary readahead harms performance, especially for SSD devices, where
+ * large reads are significantly more expensive than small ones.
+ * These implements simple swap random access detection. In swap page fault: if
+ * the page is found in swapcache, decrease a counter in the vma, otherwise we
+ * need to perform sync swapin and the counter is increased.  Optionally swapin
+ * will perform readahead if the counter is below a threshold.
  */
 #ifdef CONFIG_SWAP
 #define SWAPRA_MISS_THRESHOLD  (100)