All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1462309367.21143.12.camel@linux.intel.com>

diff --git a/a/1.txt b/N1/1.txt
index c389147..6c2ea27 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,44 +1,44 @@
 When a page is to be swapped, it needed to be added to the swap cache
-and then removed after the paging has been completed.A A A swap partition's
+and then removed after the paging has been completed.  A swap partition's
 mapping tree lock is acquired for each anonymous page's addition to the
 swap cache.
 
 This patch created new functions add_to_swap_batch and
 __add_to_swap_cache_batch that allows multiple pages destinied for the
 same swap partition to be added to that swap partition's swap cache in
-one acquisition of the mapping tree lock.A A These functions extend the
+one acquisition of the mapping tree lock.  These functions extend the
 original add_to_swap and __add_to_swap_cache. This reduces the contention
 of the swap partition's mapping tree lock when we are actively reclaiming
 memory and swapping pages
 
 Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
 ---
-A include/linux/swap.h |A A A 2 +
-A mm/swap_state.cA A A A A A | 248 +++++++++++++++++++++++++++++++++++++--------------
-A mm/vmscan.cA A A A A A A A A A |A A 19 ++--
-A 3 files changed, 196 insertions(+), 73 deletions(-)
+ include/linux/swap.h |   2 +
+ mm/swap_state.c      | 248 +++++++++++++++++++++++++++++++++++++--------------
+ mm/vmscan.c          |  19 ++--
+ 3 files changed, 196 insertions(+), 73 deletions(-)
 
 diff --git a/include/linux/swap.h b/include/linux/swap.h
 index da6d994..cd06f2a 100644
 --- a/include/linux/swap.h
 +++ b/include/linux/swap.h
 @@ -373,6 +373,8 @@ extern unsigned long total_swapcache_pages(void);
-A extern void show_swap_cache_info(void);
-A extern int add_to_swap(struct page *, struct list_head *list,
-A 			swp_entry_t *entry);
+ extern void show_swap_cache_info(void);
+ extern int add_to_swap(struct page *, struct list_head *list,
+ 			swp_entry_t *entry);
 +extern void add_to_swap_batch(struct page *pages[], struct list_head *list,
 +			swp_entry_t entries[], int ret_codes[], int nr);
-A extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t);
-A extern int __add_to_swap_cache(struct page *page, swp_entry_t entry);
-A extern void __delete_from_swap_cache(struct page *);
+ extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t);
+ extern int __add_to_swap_cache(struct page *page, swp_entry_t entry);
+ extern void __delete_from_swap_cache(struct page *);
 diff --git a/mm/swap_state.c b/mm/swap_state.c
 index bad02c1..ce02024 100644
 --- a/mm/swap_state.c
 +++ b/mm/swap_state.c
 @@ -72,49 +72,94 @@ void show_swap_cache_info(void)
-A 	printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10));
-A }
-A 
+ 	printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10));
+ }
+ 
 -/*
 - * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,
 - * but sets SwapCache flag and private instead of mapping and index.
@@ -46,14 +46,14 @@ A
 -int __add_to_swap_cache(struct page *page, swp_entry_t entry)
 +void __add_to_swap_cache_batch(struct page *pages[], swp_entry_t entries[],
 +				int ret[], int nr)
-A {
+ {
 -	int error;
 +	int error, i;
-A 	struct address_space *address_space;
+ 	struct address_space *address_space;
 +	struct address_space *prev;
 +	struct page *page;
 +	swp_entry_t entry;
-A 
 -	VM_BUG_ON_PAGE(!PageLocked(page), page);
 -	VM_BUG_ON_PAGE(PageSwapCache(page), page);
 -	VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
@@ -63,13 +63,13 @@ A
 +		/* error at pre-processing stage, swap entry already released */
 +		if (ret[i] == -ENOENT)
 +			continue;
-A 
 -	get_page(page);
 -	SetPageSwapCache(page);
 -	set_page_private(page, entry.val);
 +		page = pages[i];
 +		entry = entries[i];
-A 
 -	address_space = swap_address_space(entry);
 -	spin_lock_irq(&address_space->tree_lock);
 -	error = radix_tree_insert(&address_space->page_tree,
@@ -83,13 +83,13 @@ A
 +		VM_BUG_ON_PAGE(!PageLocked(page), page);
 +		VM_BUG_ON_PAGE(PageSwapCache(page), page);
 +		VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
-A 
 -	if (unlikely(error)) {
 -		/*
--		A * Only the context which have set SWAP_HAS_CACHE flag
--		A * would call add_to_swap_cache().
--		A * So add_to_swap_cache() doesn't returns -EEXIST.
--		A */
+-		 * Only the context which have set SWAP_HAS_CACHE flag
+-		 * would call add_to_swap_cache().
+-		 * So add_to_swap_cache() doesn't returns -EEXIST.
+-		 */
 -		VM_BUG_ON(error == -EEXIST);
 -		set_page_private(page, 0UL);
 -		ClearPageSwapCache(page);
@@ -116,10 +116,10 @@ A
 +			spin_unlock_irq(&address_space->tree_lock);
 +			address_space = NULL;
 +			/*
-+			A * Only the context which have set SWAP_HAS_CACHE flag
-+			A * would call add_to_swap_cache().
-+			A * So add_to_swap_cache() doesn't returns -EEXIST.
-+			A */
++			 * Only the context which have set SWAP_HAS_CACHE flag
++			 * would call add_to_swap_cache().
++			 * So add_to_swap_cache() doesn't returns -EEXIST.
++			 */
 +			VM_BUG_ON(error == -EEXIST);
 +			set_page_private(page, 0UL);
 +			ClearPageSwapCache(page);
@@ -127,11 +127,11 @@ A
 +		}
 +		prev = address_space;
 +		ret[i] = error;
-A 	}
+ 	}
 +	if (address_space)
 +		spin_unlock_irq(&address_space->tree_lock);
 +}
-A 
 -	return error;
 +/*
 + * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,
@@ -147,8 +147,8 @@ A
 +	entries[0] = entry;
 +	__add_to_swap_cache_batch(pages, entries, ret, 1);
 +	return ret[0];
-A }
-A 
+ }
+ 
 +void add_to_swap_cache_batch(struct page *pages[], swp_entry_t entries[],
 +				gfp_t gfp_mask, int ret[], int nr)
 +{
@@ -160,13 +160,13 @@ A
 +		radix_tree_preload_end();
 +	}
 +}
-A 
-A int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask)
-A {
+ 
+ int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask)
+ {
 @@ -151,6 +196,73 @@ void __delete_from_swap_cache(struct page *page)
-A 	INC_CACHE_INFO(del_total);
-A }
-A 
+ 	INC_CACHE_INFO(del_total);
+ }
+ 
 +void add_to_swap_batch(struct page *pages[], struct list_head *list,
 +			swp_entry_t entries[], int ret_codes[], int nr)
 +{
@@ -200,16 +200,16 @@ A
 +	}
 +
 +	/*
-+	A * Radix-tree node allocations from PF_MEMALLOC contexts could
-+	A * completely exhaust the page allocator. __GFP_NOMEMALLOC
-+	A * stops emergency reserves from being allocated.
-+	A *
-+	A * TODO: this could cause a theoretical memory reclaim
-+	A * deadlock in the swap out path.
-+	A */
++	 * Radix-tree node allocations from PF_MEMALLOC contexts could
++	 * completely exhaust the page allocator. __GFP_NOMEMALLOC
++	 * stops emergency reserves from being allocated.
++	 *
++	 * TODO: this could cause a theoretical memory reclaim
++	 * deadlock in the swap out path.
++	 */
 +	/*
-+	A * Add it to the swap cache
-+	A */
++	 * Add it to the swap cache
++	 */
 +	add_to_swap_cache_batch(pages, entries,
 +			__GFP_HIGH|__GFP_NOMEMALLOC|__GFP_NOWARN,
 +				ret_codes, nr);
@@ -218,14 +218,14 @@ A
 +		entry = &entries[i];
 +		page = pages[i];
 +
-+		if (!ret_codes[i]) {A A A A /* Success */
++		if (!ret_codes[i]) {    /* Success */
 +			ret_codes[i] = 1;
 +			continue;
-+		} else {A A A A A A A A /* -ENOMEM radix-tree allocation failure */
++		} else {        /* -ENOMEM radix-tree allocation failure */
 +			/*
-+			A * add_to_swap_cache() doesn't return -EEXIST,
-+			A * so we can safely clear SWAP_HAS_CACHE flag.
-+			A */
++			 * add_to_swap_cache() doesn't return -EEXIST,
++			 * so we can safely clear SWAP_HAS_CACHE flag.
++			 */
 +			if (ret_codes[i] != -ENOENT)
 +				swapcache_free(*entry);
 +			ret_codes[i] = 0;
@@ -234,31 +234,31 @@ A
 +	}
 +}
 +
-A /**
-A  * add_to_swap - allocate swap space for a page
-A  * @page: page we want to move to swap
+ /**
+  * add_to_swap - allocate swap space for a page
+  * @page: page we want to move to swap
 @@ -161,54 +273,56 @@ void __delete_from_swap_cache(struct page *page)
-A  */
-A int add_to_swap(struct page *page, struct list_head *list, swp_entry_t *entry)
-A {
+  */
+ int add_to_swap(struct page *page, struct list_head *list, swp_entry_t *entry)
+ {
 -	int err;
 -	swp_entry_t ent;
 +	int ret[1];
 +	swp_entry_t ent[1];
-A 
-A 	VM_BUG_ON_PAGE(!PageLocked(page), page);
-A 	VM_BUG_ON_PAGE(!PageUptodate(page), page);
-A 
-A 	if (!entry) {
+ 
+ 	VM_BUG_ON_PAGE(!PageLocked(page), page);
+ 	VM_BUG_ON_PAGE(!PageUptodate(page), page);
+ 
+ 	if (!entry) {
 -		ent = get_swap_page();
 -		entry = &ent;
 +		ent[0] = get_swap_page();
 +		entry = &ent[0];
-A 	}
-A 
-A 	if (entry && !entry->val)
-A 		return 0;
-A 
+ 	}
+ 
+ 	if (entry && !entry->val)
+ 		return 0;
+ 
 -	if (mem_cgroup_try_charge_swap(page, *entry)) {
 -		swapcache_free(*entry);
 -		return 0;
@@ -266,7 +266,7 @@ A
 +	add_to_swap_batch(&page, list, entry, ret, 1);
 +	return ret[0];
 +}
-A 
 -	if (unlikely(PageTransHuge(page)))
 -		if (unlikely(split_huge_page_to_list(page, list))) {
 -			swapcache_free(*entry);
@@ -289,67 +289,67 @@ A
 +			if (prev)
 +				spin_unlock_irq(&prev->tree_lock);
 +			spin_lock_irq(&address_space->tree_lock);
-A 		}
+ 		}
 +		__delete_from_swap_cache(page);
 +		prev = address_space;
 +	}
 +	if (address_space)
 +		spin_unlock_irq(&address_space->tree_lock);
-A 
 -	/*
--	A * Radix-tree node allocations from PF_MEMALLOC contexts could
--	A * completely exhaust the page allocator. __GFP_NOMEMALLOC
--	A * stops emergency reserves from being allocated.
--	A *
--	A * TODO: this could cause a theoretical memory reclaim
--	A * deadlock in the swap out path.
--	A */
+-	 * Radix-tree node allocations from PF_MEMALLOC contexts could
+-	 * completely exhaust the page allocator. __GFP_NOMEMALLOC
+-	 * stops emergency reserves from being allocated.
+-	 *
+-	 * TODO: this could cause a theoretical memory reclaim
+-	 * deadlock in the swap out path.
+-	 */
 -	/*
--	A * Add it to the swap cache.
--	A */
+-	 * Add it to the swap cache.
+-	 */
 -	err = add_to_swap_cache(page, *entry,
 -			__GFP_HIGH|__GFP_NOMEMALLOC|__GFP_NOWARN);
 +	for (i = 0; i < nr; ++i) {
 +		page = &pages[i];
 +		entry.val = page_private(page);
-A 
 -	if (!err) {
 -		return 1;
 -	} else {	/* -ENOMEM radix-tree allocation failure */
 -		/*
--		A * add_to_swap_cache() doesn't return -EEXIST, so we can safely
--		A * clear SWAP_HAS_CACHE flag.
--		A */
+-		 * add_to_swap_cache() doesn't return -EEXIST, so we can safely
+-		 * clear SWAP_HAS_CACHE flag.
+-		 */
 -		swapcache_free(*entry);
 -		return 0;
 +		/* can batch this */
 +		swapcache_free(entry);
 +		put_page(page);
-A 	}
-A }
-A 
+ 	}
+ }
+ 
 diff --git a/mm/vmscan.c b/mm/vmscan.c
 index 310e2b2..fab61f1 100644
 --- a/mm/vmscan.c
 +++ b/mm/vmscan.c
 @@ -1097,8 +1097,9 @@ static unsigned long shrink_anon_page_list(struct list_head *page_list,
-A 	unsigned long nr_reclaimed = 0;
-A 	enum pg_result pg_dispose;
-A 	swp_entry_t swp_entries[SWAP_BATCH];
+ 	unsigned long nr_reclaimed = 0;
+ 	enum pg_result pg_dispose;
+ 	swp_entry_t swp_entries[SWAP_BATCH];
 +	struct page *pages[SWAP_BATCH];
 +	int m, i, k, ret[SWAP_BATCH];
-A 	struct page *page;
+ 	struct page *page;
 -	int m, i, k;
-A 
-A 	while (n > 0) {
-A 		int swap_ret = SWAP_SUCCESS;
+ 
+ 	while (n > 0) {
+ 		int swap_ret = SWAP_SUCCESS;
 @@ -1117,13 +1118,19 @@ static unsigned long shrink_anon_page_list(struct list_head *page_list,
-A 			page = lru_to_page(swap_pages);
-A 
-A 			list_del(&page->lru);
+ 			page = lru_to_page(swap_pages);
+ 
+ 			list_del(&page->lru);
 +			pages[i] = page;
 +		}
-A 
 -			/*
 -			* Anonymous process memory has backing store?
 -			* Try to allocate it some swap space here.
@@ -362,17 +362,11 @@ A
 +
 +		for (i = 0; i < m; ++i) {
 +			page = pages[i];
-A 
 -			if (!add_to_swap(page, page_list, NULL)) {
 +			if (!ret[i]) {
-A 				pg_finish(page, PG_ACTIVATE_LOCKED, swap_ret,
-A 						&nr_reclaimed, pgactivate,
-A 						ret_pages, free_pages);
---A 
+ 				pg_finish(page, PG_ACTIVATE_LOCKED, swap_ret,
+ 						&nr_reclaimed, pgactivate,
+ 						ret_pages, free_pages);
+-- 
 2.5.5
-
---
-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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
diff --git a/a/content_digest b/N1/content_digest
index 4f1db22..086acdf 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -17,46 +17,46 @@
  "\00:1\0"
  "b\0"
  "When a page is to be swapped, it needed to be added to the swap cache\n"
- "and then removed after the paging has been completed.A A A swap partition's\n"
+ "and then removed after the paging has been completed.\302\240\302\240A swap partition's\n"
  "mapping tree lock is acquired for each anonymous page's addition to the\n"
  "swap cache.\n"
  "\n"
  "This patch created new functions add_to_swap_batch and\n"
  "__add_to_swap_cache_batch that allows multiple pages destinied for the\n"
  "same swap partition to be added to that swap partition's swap cache in\n"
- "one acquisition of the mapping tree lock.A A These functions extend the\n"
+ "one acquisition of the mapping tree lock.\302\240\302\240These functions extend the\n"
  "original add_to_swap and __add_to_swap_cache. This reduces the contention\n"
  "of the swap partition's mapping tree lock when we are actively reclaiming\n"
  "memory and swapping pages\n"
  "\n"
  "Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>\n"
  "---\n"
- "A include/linux/swap.h |A A A 2 +\n"
- "A mm/swap_state.cA A A A A A | 248 +++++++++++++++++++++++++++++++++++++--------------\n"
- "A mm/vmscan.cA A A A A A A A A A |A A 19 ++--\n"
- "A 3 files changed, 196 insertions(+), 73 deletions(-)\n"
+ "\302\240include/linux/swap.h |\302\240\302\240\302\2402 +\n"
+ "\302\240mm/swap_state.c\302\240\302\240\302\240\302\240\302\240\302\240| 248 +++++++++++++++++++++++++++++++++++++--------------\n"
+ "\302\240mm/vmscan.c\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240|\302\240\302\24019 ++--\n"
+ "\302\2403 files changed, 196 insertions(+), 73 deletions(-)\n"
  "\n"
  "diff --git a/include/linux/swap.h b/include/linux/swap.h\n"
  "index da6d994..cd06f2a 100644\n"
  "--- a/include/linux/swap.h\n"
  "+++ b/include/linux/swap.h\n"
  "@@ -373,6 +373,8 @@ extern unsigned long total_swapcache_pages(void);\n"
- "A extern void show_swap_cache_info(void);\n"
- "A extern int add_to_swap(struct page *, struct list_head *list,\n"
- "A \t\t\tswp_entry_t *entry);\n"
+ "\302\240extern void show_swap_cache_info(void);\n"
+ "\302\240extern int add_to_swap(struct page *, struct list_head *list,\n"
+ "\302\240\t\t\tswp_entry_t *entry);\n"
  "+extern void add_to_swap_batch(struct page *pages[], struct list_head *list,\n"
  "+\t\t\tswp_entry_t entries[], int ret_codes[], int nr);\n"
- "A extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t);\n"
- "A extern int __add_to_swap_cache(struct page *page, swp_entry_t entry);\n"
- "A extern void __delete_from_swap_cache(struct page *);\n"
+ "\302\240extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t);\n"
+ "\302\240extern int __add_to_swap_cache(struct page *page, swp_entry_t entry);\n"
+ "\302\240extern void __delete_from_swap_cache(struct page *);\n"
  "diff --git a/mm/swap_state.c b/mm/swap_state.c\n"
  "index bad02c1..ce02024 100644\n"
  "--- a/mm/swap_state.c\n"
  "+++ b/mm/swap_state.c\n"
  "@@ -72,49 +72,94 @@ void show_swap_cache_info(void)\n"
- "A \tprintk(\"Total swap = %lukB\\n\", total_swap_pages << (PAGE_SHIFT - 10));\n"
- "A }\n"
- "A \n"
+ "\302\240\tprintk(\"Total swap = %lukB\\n\", total_swap_pages << (PAGE_SHIFT - 10));\n"
+ "\302\240}\n"
+ "\302\240\n"
  "-/*\n"
  "- * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,\n"
  "- * but sets SwapCache flag and private instead of mapping and index.\n"
@@ -64,14 +64,14 @@
  "-int __add_to_swap_cache(struct page *page, swp_entry_t entry)\n"
  "+void __add_to_swap_cache_batch(struct page *pages[], swp_entry_t entries[],\n"
  "+\t\t\t\tint ret[], int nr)\n"
- "A {\n"
+ "\302\240{\n"
  "-\tint error;\n"
  "+\tint error, i;\n"
- "A \tstruct address_space *address_space;\n"
+ "\302\240\tstruct address_space *address_space;\n"
  "+\tstruct address_space *prev;\n"
  "+\tstruct page *page;\n"
  "+\tswp_entry_t entry;\n"
- "A \n"
+ "\302\240\n"
  "-\tVM_BUG_ON_PAGE(!PageLocked(page), page);\n"
  "-\tVM_BUG_ON_PAGE(PageSwapCache(page), page);\n"
  "-\tVM_BUG_ON_PAGE(!PageSwapBacked(page), page);\n"
@@ -81,13 +81,13 @@
  "+\t\t/* error at pre-processing stage, swap entry already released */\n"
  "+\t\tif (ret[i] == -ENOENT)\n"
  "+\t\t\tcontinue;\n"
- "A \n"
+ "\302\240\n"
  "-\tget_page(page);\n"
  "-\tSetPageSwapCache(page);\n"
  "-\tset_page_private(page, entry.val);\n"
  "+\t\tpage = pages[i];\n"
  "+\t\tentry = entries[i];\n"
- "A \n"
+ "\302\240\n"
  "-\taddress_space = swap_address_space(entry);\n"
  "-\tspin_lock_irq(&address_space->tree_lock);\n"
  "-\terror = radix_tree_insert(&address_space->page_tree,\n"
@@ -101,13 +101,13 @@
  "+\t\tVM_BUG_ON_PAGE(!PageLocked(page), page);\n"
  "+\t\tVM_BUG_ON_PAGE(PageSwapCache(page), page);\n"
  "+\t\tVM_BUG_ON_PAGE(!PageSwapBacked(page), page);\n"
- "A \n"
+ "\302\240\n"
  "-\tif (unlikely(error)) {\n"
  "-\t\t/*\n"
- "-\t\tA * Only the context which have set SWAP_HAS_CACHE flag\n"
- "-\t\tA * would call add_to_swap_cache().\n"
- "-\t\tA * So add_to_swap_cache() doesn't returns -EEXIST.\n"
- "-\t\tA */\n"
+ "-\t\t\302\240* Only the context which have set SWAP_HAS_CACHE flag\n"
+ "-\t\t\302\240* would call add_to_swap_cache().\n"
+ "-\t\t\302\240* So add_to_swap_cache() doesn't returns -EEXIST.\n"
+ "-\t\t\302\240*/\n"
  "-\t\tVM_BUG_ON(error == -EEXIST);\n"
  "-\t\tset_page_private(page, 0UL);\n"
  "-\t\tClearPageSwapCache(page);\n"
@@ -134,10 +134,10 @@
  "+\t\t\tspin_unlock_irq(&address_space->tree_lock);\n"
  "+\t\t\taddress_space = NULL;\n"
  "+\t\t\t/*\n"
- "+\t\t\tA * Only the context which have set SWAP_HAS_CACHE flag\n"
- "+\t\t\tA * would call add_to_swap_cache().\n"
- "+\t\t\tA * So add_to_swap_cache() doesn't returns -EEXIST.\n"
- "+\t\t\tA */\n"
+ "+\t\t\t\302\240* Only the context which have set SWAP_HAS_CACHE flag\n"
+ "+\t\t\t\302\240* would call add_to_swap_cache().\n"
+ "+\t\t\t\302\240* So add_to_swap_cache() doesn't returns -EEXIST.\n"
+ "+\t\t\t\302\240*/\n"
  "+\t\t\tVM_BUG_ON(error == -EEXIST);\n"
  "+\t\t\tset_page_private(page, 0UL);\n"
  "+\t\t\tClearPageSwapCache(page);\n"
@@ -145,11 +145,11 @@
  "+\t\t}\n"
  "+\t\tprev = address_space;\n"
  "+\t\tret[i] = error;\n"
- "A \t}\n"
+ "\302\240\t}\n"
  "+\tif (address_space)\n"
  "+\t\tspin_unlock_irq(&address_space->tree_lock);\n"
  "+}\n"
- "A \n"
+ "\302\240\n"
  "-\treturn error;\n"
  "+/*\n"
  "+ * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,\n"
@@ -165,8 +165,8 @@
  "+\tentries[0] = entry;\n"
  "+\t__add_to_swap_cache_batch(pages, entries, ret, 1);\n"
  "+\treturn ret[0];\n"
- "A }\n"
- "A \n"
+ "\302\240}\n"
+ "\302\240\n"
  "+void add_to_swap_cache_batch(struct page *pages[], swp_entry_t entries[],\n"
  "+\t\t\t\tgfp_t gfp_mask, int ret[], int nr)\n"
  "+{\n"
@@ -178,13 +178,13 @@
  "+\t\tradix_tree_preload_end();\n"
  "+\t}\n"
  "+}\n"
- "A \n"
- "A int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask)\n"
- "A {\n"
+ "\302\240\n"
+ "\302\240int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask)\n"
+ "\302\240{\n"
  "@@ -151,6 +196,73 @@ void __delete_from_swap_cache(struct page *page)\n"
- "A \tINC_CACHE_INFO(del_total);\n"
- "A }\n"
- "A \n"
+ "\302\240\tINC_CACHE_INFO(del_total);\n"
+ "\302\240}\n"
+ "\302\240\n"
  "+void add_to_swap_batch(struct page *pages[], struct list_head *list,\n"
  "+\t\t\tswp_entry_t entries[], int ret_codes[], int nr)\n"
  "+{\n"
@@ -218,16 +218,16 @@
  "+\t}\n"
  "+\n"
  "+\t/*\n"
- "+\tA * Radix-tree node allocations from PF_MEMALLOC contexts could\n"
- "+\tA * completely exhaust the page allocator. __GFP_NOMEMALLOC\n"
- "+\tA * stops emergency reserves from being allocated.\n"
- "+\tA *\n"
- "+\tA * TODO: this could cause a theoretical memory reclaim\n"
- "+\tA * deadlock in the swap out path.\n"
- "+\tA */\n"
+ "+\t\302\240* Radix-tree node allocations from PF_MEMALLOC contexts could\n"
+ "+\t\302\240* completely exhaust the page allocator. __GFP_NOMEMALLOC\n"
+ "+\t\302\240* stops emergency reserves from being allocated.\n"
+ "+\t\302\240*\n"
+ "+\t\302\240* TODO: this could cause a theoretical memory reclaim\n"
+ "+\t\302\240* deadlock in the swap out path.\n"
+ "+\t\302\240*/\n"
  "+\t/*\n"
- "+\tA * Add it to the swap cache\n"
- "+\tA */\n"
+ "+\t\302\240* Add it to the swap cache\n"
+ "+\t\302\240*/\n"
  "+\tadd_to_swap_cache_batch(pages, entries,\n"
  "+\t\t\t__GFP_HIGH|__GFP_NOMEMALLOC|__GFP_NOWARN,\n"
  "+\t\t\t\tret_codes, nr);\n"
@@ -236,14 +236,14 @@
  "+\t\tentry = &entries[i];\n"
  "+\t\tpage = pages[i];\n"
  "+\n"
- "+\t\tif (!ret_codes[i]) {A A A A /* Success */\n"
+ "+\t\tif (!ret_codes[i]) {\302\240\302\240\302\240\302\240/* Success */\n"
  "+\t\t\tret_codes[i] = 1;\n"
  "+\t\t\tcontinue;\n"
- "+\t\t} else {A A A A A A A A /* -ENOMEM radix-tree allocation failure */\n"
+ "+\t\t} else {\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240/* -ENOMEM radix-tree allocation failure */\n"
  "+\t\t\t/*\n"
- "+\t\t\tA * add_to_swap_cache() doesn't return -EEXIST,\n"
- "+\t\t\tA * so we can safely clear SWAP_HAS_CACHE flag.\n"
- "+\t\t\tA */\n"
+ "+\t\t\t\302\240* add_to_swap_cache() doesn't return -EEXIST,\n"
+ "+\t\t\t\302\240* so we can safely clear SWAP_HAS_CACHE flag.\n"
+ "+\t\t\t\302\240*/\n"
  "+\t\t\tif (ret_codes[i] != -ENOENT)\n"
  "+\t\t\t\tswapcache_free(*entry);\n"
  "+\t\t\tret_codes[i] = 0;\n"
@@ -252,31 +252,31 @@
  "+\t}\n"
  "+}\n"
  "+\n"
- "A /**\n"
- "A  * add_to_swap - allocate swap space for a page\n"
- "A  * @page: page we want to move to swap\n"
+ "\302\240/**\n"
+ "\302\240 * add_to_swap - allocate swap space for a page\n"
+ "\302\240 * @page: page we want to move to swap\n"
  "@@ -161,54 +273,56 @@ void __delete_from_swap_cache(struct page *page)\n"
- "A  */\n"
- "A int add_to_swap(struct page *page, struct list_head *list, swp_entry_t *entry)\n"
- "A {\n"
+ "\302\240 */\n"
+ "\302\240int add_to_swap(struct page *page, struct list_head *list, swp_entry_t *entry)\n"
+ "\302\240{\n"
  "-\tint err;\n"
  "-\tswp_entry_t ent;\n"
  "+\tint ret[1];\n"
  "+\tswp_entry_t ent[1];\n"
- "A \n"
- "A \tVM_BUG_ON_PAGE(!PageLocked(page), page);\n"
- "A \tVM_BUG_ON_PAGE(!PageUptodate(page), page);\n"
- "A \n"
- "A \tif (!entry) {\n"
+ "\302\240\n"
+ "\302\240\tVM_BUG_ON_PAGE(!PageLocked(page), page);\n"
+ "\302\240\tVM_BUG_ON_PAGE(!PageUptodate(page), page);\n"
+ "\302\240\n"
+ "\302\240\tif (!entry) {\n"
  "-\t\tent = get_swap_page();\n"
  "-\t\tentry = &ent;\n"
  "+\t\tent[0] = get_swap_page();\n"
  "+\t\tentry = &ent[0];\n"
- "A \t}\n"
- "A \n"
- "A \tif (entry && !entry->val)\n"
- "A \t\treturn 0;\n"
- "A \n"
+ "\302\240\t}\n"
+ "\302\240\n"
+ "\302\240\tif (entry && !entry->val)\n"
+ "\302\240\t\treturn 0;\n"
+ "\302\240\n"
  "-\tif (mem_cgroup_try_charge_swap(page, *entry)) {\n"
  "-\t\tswapcache_free(*entry);\n"
  "-\t\treturn 0;\n"
@@ -284,7 +284,7 @@
  "+\tadd_to_swap_batch(&page, list, entry, ret, 1);\n"
  "+\treturn ret[0];\n"
  "+}\n"
- "A \n"
+ "\302\240\n"
  "-\tif (unlikely(PageTransHuge(page)))\n"
  "-\t\tif (unlikely(split_huge_page_to_list(page, list))) {\n"
  "-\t\t\tswapcache_free(*entry);\n"
@@ -307,67 +307,67 @@
  "+\t\t\tif (prev)\n"
  "+\t\t\t\tspin_unlock_irq(&prev->tree_lock);\n"
  "+\t\t\tspin_lock_irq(&address_space->tree_lock);\n"
- "A \t\t}\n"
+ "\302\240\t\t}\n"
  "+\t\t__delete_from_swap_cache(page);\n"
  "+\t\tprev = address_space;\n"
  "+\t}\n"
  "+\tif (address_space)\n"
  "+\t\tspin_unlock_irq(&address_space->tree_lock);\n"
- "A \n"
+ "\302\240\n"
  "-\t/*\n"
- "-\tA * Radix-tree node allocations from PF_MEMALLOC contexts could\n"
- "-\tA * completely exhaust the page allocator. __GFP_NOMEMALLOC\n"
- "-\tA * stops emergency reserves from being allocated.\n"
- "-\tA *\n"
- "-\tA * TODO: this could cause a theoretical memory reclaim\n"
- "-\tA * deadlock in the swap out path.\n"
- "-\tA */\n"
+ "-\t\302\240* Radix-tree node allocations from PF_MEMALLOC contexts could\n"
+ "-\t\302\240* completely exhaust the page allocator. __GFP_NOMEMALLOC\n"
+ "-\t\302\240* stops emergency reserves from being allocated.\n"
+ "-\t\302\240*\n"
+ "-\t\302\240* TODO: this could cause a theoretical memory reclaim\n"
+ "-\t\302\240* deadlock in the swap out path.\n"
+ "-\t\302\240*/\n"
  "-\t/*\n"
- "-\tA * Add it to the swap cache.\n"
- "-\tA */\n"
+ "-\t\302\240* Add it to the swap cache.\n"
+ "-\t\302\240*/\n"
  "-\terr = add_to_swap_cache(page, *entry,\n"
  "-\t\t\t__GFP_HIGH|__GFP_NOMEMALLOC|__GFP_NOWARN);\n"
  "+\tfor (i = 0; i < nr; ++i) {\n"
  "+\t\tpage = &pages[i];\n"
  "+\t\tentry.val = page_private(page);\n"
- "A \n"
+ "\302\240\n"
  "-\tif (!err) {\n"
  "-\t\treturn 1;\n"
  "-\t} else {\t/* -ENOMEM radix-tree allocation failure */\n"
  "-\t\t/*\n"
- "-\t\tA * add_to_swap_cache() doesn't return -EEXIST, so we can safely\n"
- "-\t\tA * clear SWAP_HAS_CACHE flag.\n"
- "-\t\tA */\n"
+ "-\t\t\302\240* add_to_swap_cache() doesn't return -EEXIST, so we can safely\n"
+ "-\t\t\302\240* clear SWAP_HAS_CACHE flag.\n"
+ "-\t\t\302\240*/\n"
  "-\t\tswapcache_free(*entry);\n"
  "-\t\treturn 0;\n"
  "+\t\t/* can batch this */\n"
  "+\t\tswapcache_free(entry);\n"
  "+\t\tput_page(page);\n"
- "A \t}\n"
- "A }\n"
- "A \n"
+ "\302\240\t}\n"
+ "\302\240}\n"
+ "\302\240\n"
  "diff --git a/mm/vmscan.c b/mm/vmscan.c\n"
  "index 310e2b2..fab61f1 100644\n"
  "--- a/mm/vmscan.c\n"
  "+++ b/mm/vmscan.c\n"
  "@@ -1097,8 +1097,9 @@ static unsigned long shrink_anon_page_list(struct list_head *page_list,\n"
- "A \tunsigned long nr_reclaimed = 0;\n"
- "A \tenum pg_result pg_dispose;\n"
- "A \tswp_entry_t swp_entries[SWAP_BATCH];\n"
+ "\302\240\tunsigned long nr_reclaimed = 0;\n"
+ "\302\240\tenum pg_result pg_dispose;\n"
+ "\302\240\tswp_entry_t swp_entries[SWAP_BATCH];\n"
  "+\tstruct page *pages[SWAP_BATCH];\n"
  "+\tint m, i, k, ret[SWAP_BATCH];\n"
- "A \tstruct page *page;\n"
+ "\302\240\tstruct page *page;\n"
  "-\tint m, i, k;\n"
- "A \n"
- "A \twhile (n > 0) {\n"
- "A \t\tint swap_ret = SWAP_SUCCESS;\n"
+ "\302\240\n"
+ "\302\240\twhile (n > 0) {\n"
+ "\302\240\t\tint swap_ret = SWAP_SUCCESS;\n"
  "@@ -1117,13 +1118,19 @@ static unsigned long shrink_anon_page_list(struct list_head *page_list,\n"
- "A \t\t\tpage = lru_to_page(swap_pages);\n"
- "A \n"
- "A \t\t\tlist_del(&page->lru);\n"
+ "\302\240\t\t\tpage = lru_to_page(swap_pages);\n"
+ "\302\240\n"
+ "\302\240\t\t\tlist_del(&page->lru);\n"
  "+\t\t\tpages[i] = page;\n"
  "+\t\t}\n"
- "A \n"
+ "\302\240\n"
  "-\t\t\t/*\n"
  "-\t\t\t* Anonymous process memory has backing store?\n"
  "-\t\t\t* Try to allocate it some swap space here.\n"
@@ -380,19 +380,13 @@
  "+\n"
  "+\t\tfor (i = 0; i < m; ++i) {\n"
  "+\t\t\tpage = pages[i];\n"
- "A \n"
+ "\302\240\n"
  "-\t\t\tif (!add_to_swap(page, page_list, NULL)) {\n"
  "+\t\t\tif (!ret[i]) {\n"
- "A \t\t\t\tpg_finish(page, PG_ACTIVATE_LOCKED, swap_ret,\n"
- "A \t\t\t\t\t\t&nr_reclaimed, pgactivate,\n"
- "A \t\t\t\t\t\tret_pages, free_pages);\n"
- "--A \n"
- "2.5.5\n"
- "\n"
- "--\n"
- "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n"
- "the body to majordomo@kvack.org.  For more info on Linux MM,\n"
- "see: http://www.linux-mm.org/ .\n"
- "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>"
+ "\302\240\t\t\t\tpg_finish(page, PG_ACTIVATE_LOCKED, swap_ret,\n"
+ "\302\240\t\t\t\t\t\t&nr_reclaimed, pgactivate,\n"
+ "\302\240\t\t\t\t\t\tret_pages, free_pages);\n"
+ "--\302\240\n"
+ 2.5.5
 
-c3d968c22173213adb5119430350418cb2ee42977eca2c025e7a0e640411545f
+839038daced6065d179afc30f5ce72dbdcb87e0ee292575755b4260ea06fa408

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.