]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Revert "swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix"
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:57:48 +0000 (17:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:57:48 +0000 (17:57 +1000)
This reverts commit 2190b4eab17a1897fe314f00265548e8c51f1271.

mm/internal.h

index eebbed59b85b26bab16d2d9da47a8d7849ce24ea..6f9dc95dd805bfb8cceb02999ec48aca71efd91c 100644 (file)
@@ -361,12 +361,15 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
                                            struct list_head *page_list);
 
 /*
- * 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.
+ * 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.
  */
 #ifdef CONFIG_SWAP
 #define SWAPRA_MISS_THRESHOLD  (100)