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

diff --git a/a/1.txt b/N1/1.txt
index 3050f30..528f41c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,7 +1,7 @@
 We created a new function __remove_swap_mapping_batch that
 allows all pages under the same swap partition to be removed
 from the swap cache's mapping in a single acquisition
-of the mapping's tree lock.A A This reduces the contention
+of the mapping's tree lock.  This reduces the contention
 on the lock when multiple threads are reclaiming
 memory by swapping to the same swap partition.
 
@@ -11,20 +11,20 @@ when the have been paged out.
 
 Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
 ---
-A mm/vmscan.c | 426 ++++++++++++++++++++++++++++++++++++++++--------------------
-A 1 file changed, 286 insertions(+), 140 deletions(-)
+ mm/vmscan.c | 426 ++++++++++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 286 insertions(+), 140 deletions(-)
 
 diff --git a/mm/vmscan.c b/mm/vmscan.c
 index 9fc04e1..5e4b8ce 100644
 --- a/mm/vmscan.c
 +++ b/mm/vmscan.c
 @@ -690,6 +690,103 @@ cannot_free:
-A 	return 0;
-A }
-A 
+ 	return 0;
+ }
+ 
 +/* use this only for swap mapped pages */
 +static void __remove_swap_mapping_batch(struct page *pages[],
-+			A A A A bool reclaimed, short ret[], int nr)
++			    bool reclaimed, short ret[], int nr)
 +{
 +	unsigned long flags;
 +	struct page *page;
@@ -56,30 +56,30 @@ A
 +				break;
 +			}
 +			/*
-+			A * The non racy check for a busy page.
-+			A *
-+			A * Must be careful with the order of the tests. When someone has
-+			A * a ref to the page, it may be possible that they dirty it then
-+			A * drop the reference. So if PageDirty is tested before page_count
-+			A * here, then the following race may occur:
-+			A *
-+			A * get_user_pages(&page);
-+			A * [user mapping goes away]
-+			A * write_to(page);
-+			A *				!PageDirty(page)A A A A [good]
-+			A * SetPageDirty(page);
-+			A * put_page(page);
-+			A *				!page_count(page)A A A [good, discard it]
-+			A *
-+			A * [oops, our write_to data is lost]
-+			A *
-+			A * Reversing the order of the tests ensures such a situation cannot
-+			A * escape unnoticed. The smp_rmb is needed to ensure the page->flags
-+			A * load is not satisfied before that of page->_count.
-+			A *
-+			A * Note that if SetPageDirty is always performed via set_page_dirty,
-+			A * and thus under tree_lock, then this ordering is not required.
-+			A */
++			 * The non racy check for a busy page.
++			 *
++			 * Must be careful with the order of the tests. When someone has
++			 * a ref to the page, it may be possible that they dirty it then
++			 * drop the reference. So if PageDirty is tested before page_count
++			 * here, then the following race may occur:
++			 *
++			 * get_user_pages(&page);
++			 * [user mapping goes away]
++			 * write_to(page);
++			 *				!PageDirty(page)    [good]
++			 * SetPageDirty(page);
++			 * put_page(page);
++			 *				!page_count(page)   [good, discard it]
++			 *
++			 * [oops, our write_to data is lost]
++			 *
++			 * Reversing the order of the tests ensures such a situation cannot
++			 * escape unnoticed. The smp_rmb is needed to ensure the page->flags
++			 * load is not satisfied before that of page->_count.
++			 *
++			 * Note that if SetPageDirty is always performed via set_page_dirty,
++			 * and thus under tree_lock, then this ordering is not required.
++			 */
 +			if (!page_ref_freeze(page, 2))
 +				goto cannot_free;
 +			/* note: atomic_cmpxchg in page_freeze_refs provides the smp_rmb */
@@ -99,7 +99,7 @@ A
 +		}
 +		spin_unlock_irqrestore(&mapping->tree_lock, flags);
 +
-+		/* need to keep irq off for mem_cgroup accounting, don't restore flags yetA A */
++		/* need to keep irq off for mem_cgroup accounting, don't restore flags yet  */
 +		local_irq_disable();
 +		for (i = 0; i < batch_size; ++i) {
 +			if (ret[i]) {
@@ -119,20 +119,20 @@ A
 +		nr -= batch_size;
 +	}
 +}
-A /*
-A  * Attempt to detach a locked page from its ->mapping.A A If it is dirty or if
-A  * someone else has a ref on the page, abort and return 0.A A If it was
+ /*
+  * Attempt to detach a locked page from its ->mapping.  If it is dirty or if
+  * someone else has a ref on the page, abort and return 0.  If it was
 @@ -897,177 +994,226 @@ static void handle_pgout_batch(struct list_head *page_list,
-A 	int nr)
-A {
-A 	struct address_space *mapping;
+ 	int nr)
+ {
+ 	struct address_space *mapping;
 +	struct page *umap_pages[SWAP_BATCH];
-A 	struct page *page;
+ 	struct page *page;
 -	int i;
 -
 -	for (i = 0; i < nr; ++i) {
 -		page = pages[i];
--		mapping =A A page_mapping(page);
+-		mapping =  page_mapping(page);
 +	int i, j, batch_size;
 +	short umap_ret[SWAP_BATCH], idx[SWAP_BATCH];
 +
@@ -151,17 +151,17 @@ A 	struct page *page;
 +					break;
 +				}
 +			} else
-+				mapping =A A page_mapping(page);
-A 
++				mapping =  page_mapping(page);
+ 
 -		/* check outcome of cache addition */
 -		if (!ret[i]) {
 -			ret[i] = PG_ACTIVATE_LOCKED;
 -			continue;
 -		}
 -		/*
--		A * The page is mapped into the page tables of one or more
--		A * processes. Try to unmap it here.
--		A */
+-		 * The page is mapped into the page tables of one or more
+-		 * processes. Try to unmap it here.
+-		 */
 -		if (page_mapped(page) && mapping) {
 -			switch (swap_ret[i] = try_to_unmap(page, lazyfree ?
 -				(ttu_flags | TTU_BATCH_FLUSH | TTU_LZFREE) :
@@ -169,8 +169,8 @@ A
 -			case SWAP_FAIL:
 +			/* check outcome of cache addition */
 +			if (!ret[i]) {
-A 				ret[i] = PG_ACTIVATE_LOCKED;
-A 				continue;
+ 				ret[i] = PG_ACTIVATE_LOCKED;
+ 				continue;
 -			case SWAP_AGAIN:
 -				ret[i] = PG_KEEP_LOCKED;
 -				continue;
@@ -181,20 +181,20 @@ A 				continue;
 -				goto lazyfree;
 -			case SWAP_SUCCESS:
 -				; /* try to free the page below */
-A 			}
+ 			}
 -		}
 -
 -		if (PageDirty(page)) {
-A 			/*
--			A * Only kswapd can writeback filesystem pages to
--			A * avoid risk of stack overflow but only writeback
--			A * if many dirty pages have been encountered.
-+			A * The page is mapped into the page tables of one or more
-+			A * processes. Try to unmap it here.
-A 			A */
+ 			/*
+-			 * Only kswapd can writeback filesystem pages to
+-			 * avoid risk of stack overflow but only writeback
+-			 * if many dirty pages have been encountered.
++			 * The page is mapped into the page tables of one or more
++			 * processes. Try to unmap it here.
+ 			 */
 -			if (page_is_file_cache(page) &&
 -					(!current_is_kswapd() ||
--					A !test_bit(ZONE_DIRTY, &zone->flags))) {
+-					 !test_bit(ZONE_DIRTY, &zone->flags))) {
 +			if (page_mapped(page) && mapping) {
 +				switch (swap_ret[i] = try_to_unmap(page, lazyfree ?
 +					(ttu_flags | TTU_BATCH_FLUSH | TTU_LZFREE) :
@@ -216,15 +216,15 @@ A 			A */
 +			}
 +
 +			if (PageDirty(page)) {
-A 				/*
--				A * Immediately reclaim when written back.
--				A * Similar in principal to deactivate_page()
--				A * except we already have the page isolated
--				A * and know it's dirty
-+				A * Only kswapd can writeback filesystem pages to
-+				A * avoid risk of stack overflow but only writeback
-+				A * if many dirty pages have been encountered.
-A 				A */
+ 				/*
+-				 * Immediately reclaim when written back.
+-				 * Similar in principal to deactivate_page()
+-				 * except we already have the page isolated
+-				 * and know it's dirty
++				 * Only kswapd can writeback filesystem pages to
++				 * avoid risk of stack overflow but only writeback
++				 * if many dirty pages have been encountered.
+ 				 */
 -				inc_zone_page_state(page, NR_VMSCAN_IMMEDIATE);
 -				SetPageReclaim(page);
 -
@@ -233,16 +233,16 @@ A 				A */
 -			}
 +				if (page_is_file_cache(page) &&
 +						(!current_is_kswapd() ||
-+						A !test_bit(ZONE_DIRTY, &zone->flags))) {
++						 !test_bit(ZONE_DIRTY, &zone->flags))) {
 +					/*
-+					A * Immediately reclaim when written back.
-+					A * Similar in principal to deactivate_page()
-+					A * except we already have the page isolated
-+					A * and know it's dirty
-+					A */
++					 * Immediately reclaim when written back.
++					 * Similar in principal to deactivate_page()
++					 * except we already have the page isolated
++					 * and know it's dirty
++					 */
 +					inc_zone_page_state(page, NR_VMSCAN_IMMEDIATE);
 +					SetPageReclaim(page);
-A 
 -			if (references == PAGEREF_RECLAIM_CLEAN) {
 -				ret[i] = PG_KEEP_LOCKED;
 -				continue;
@@ -258,12 +258,12 @@ A
 +					ret[i] = PG_KEEP_LOCKED;
 +					continue;
 +				}
-A 
 -			/*
--			A * Page is dirty. Flush the TLB if a writable entry
--			A * potentially exists to avoid CPU writes after IO
--			A * starts and then write it out here.
--			A */
+-			 * Page is dirty. Flush the TLB if a writable entry
+-			 * potentially exists to avoid CPU writes after IO
+-			 * starts and then write it out here.
+-			 */
 -			try_to_unmap_flush_dirty();
 -			switch (pageout(page, mapping, sc)) {
 -			case PAGE_KEEP:
@@ -281,22 +281,22 @@ A
 +				}
 +				if (!may_enter_fs) {
 +					ret[i] = PG_KEEP_LOCKED;
-A 					continue;
-A 				}
+ 					continue;
+ 				}
 -				if (PageDirty(page)) {
 -					ret[i] = PG_KEEP;
 +				if (!sc->may_writepage) {
 +					ret[i] = PG_KEEP_LOCKED;
-A 					continue;
-A 				}
-A 
-A 				/*
--				A * A synchronous write - probably a ramdisk.A A Go
--				A * ahead and try to reclaim the page.
-+				A * Page is dirty. Flush the TLB if a writable entry
-+				A * potentially exists to avoid CPU writes after IO
-+				A * starts and then write it out here.
-A 				A */
+ 					continue;
+ 				}
+ 
+ 				/*
+-				 * A synchronous write - probably a ramdisk.  Go
+-				 * ahead and try to reclaim the page.
++				 * Page is dirty. Flush the TLB if a writable entry
++				 * potentially exists to avoid CPU writes after IO
++				 * starts and then write it out here.
+ 				 */
 -				if (!trylock_page(page)) {
 -					ret[i] = PG_KEEP;
 -					continue;
@@ -305,8 +305,8 @@ A 				A */
 +				try_to_unmap_flush_dirty();
 +				switch (pageout(page, mapping, sc)) {
 +				case PAGE_KEEP:
-A 					ret[i] = PG_KEEP_LOCKED;
-A 					continue;
+ 					ret[i] = PG_KEEP_LOCKED;
+ 					continue;
 +				case PAGE_ACTIVATE:
 +					ret[i] = PG_ACTIVATE_LOCKED;
 +					continue;
@@ -321,9 +321,9 @@ A 					continue;
 +					}
 +
 +					/*
-+					A * A synchronous write - probably a ramdisk.A A Go
-+					A * ahead and try to reclaim the page.
-+					A */
++					 * A synchronous write - probably a ramdisk.  Go
++					 * ahead and try to reclaim the page.
++					 */
 +					if (!trylock_page(page)) {
 +						ret[i] = PG_KEEP;
 +						continue;
@@ -335,58 +335,58 @@ A 					continue;
 +					mapping = page_mapping(page);
 +				case PAGE_CLEAN:
 +					; /* try to free the page below */
-A 				}
+ 				}
 -				mapping = page_mapping(page);
 -			case PAGE_CLEAN:
 -				; /* try to free the page below */
-A 			}
+ 			}
 -		}
-A 
 -		/*
--		A * If the page has buffers, try to free the buffer mappings
--		A * associated with this page. If we succeed we try to free
--		A * the page as well.
--		A *
--		A * We do this even if the page is PageDirty().
--		A * try_to_release_page() does not perform I/O, but it is
--		A * possible for a page to have PageDirty set, but it is actually
--		A * clean (all its buffers are clean).A A This happens if the
--		A * buffers were written out directly, with submit_bh(). ext3
--		A * will do this, as well as the blockdev mapping.
--		A * try_to_release_page() will discover that cleanness and will
--		A * drop the buffers and mark the page clean - it can be freed.
--		A *
--		A * Rarely, pages can have buffers and no ->mapping.A A These are
--		A * the pages which were not successfully invalidated in
--		A * truncate_complete_page().A A We try to drop those buffers here
--		A * and if that worked, and the page is no longer mapped into
--		A * process address space (page_count == 1) it can be freed.
--		A * Otherwise, leave the page on the LRU so it is swappable.
--		A */
+-		 * If the page has buffers, try to free the buffer mappings
+-		 * associated with this page. If we succeed we try to free
+-		 * the page as well.
+-		 *
+-		 * We do this even if the page is PageDirty().
+-		 * try_to_release_page() does not perform I/O, but it is
+-		 * possible for a page to have PageDirty set, but it is actually
+-		 * clean (all its buffers are clean).  This happens if the
+-		 * buffers were written out directly, with submit_bh(). ext3
+-		 * will do this, as well as the blockdev mapping.
+-		 * try_to_release_page() will discover that cleanness and will
+-		 * drop the buffers and mark the page clean - it can be freed.
+-		 *
+-		 * Rarely, pages can have buffers and no ->mapping.  These are
+-		 * the pages which were not successfully invalidated in
+-		 * truncate_complete_page().  We try to drop those buffers here
+-		 * and if that worked, and the page is no longer mapped into
+-		 * process address space (page_count == 1) it can be freed.
+-		 * Otherwise, leave the page on the LRU so it is swappable.
+-		 */
 -		if (page_has_private(page)) {
 -			if (!try_to_release_page(page, sc->gfp_mask)) {
 -				ret[i] = PG_ACTIVATE_LOCKED;
 +			/*
-+			A * If the page has buffers, try to free the buffer mappings
-+			A * associated with this page. If we succeed we try to free
-+			A * the page as well.
-+			A *
-+			A * We do this even if the page is PageDirty().
-+			A * try_to_release_page() does not perform I/O, but it is
-+			A * possible for a page to have PageDirty set, but it is actually
-+			A * clean (all its buffers are clean).A A This happens if the
-+			A * buffers were written out directly, with submit_bh(). ext3
-+			A * will do this, as well as the blockdev mapping.
-+			A * try_to_release_page() will discover that cleanness and will
-+			A * drop the buffers and mark the page clean - it can be freed.
-+			A *
-+			A * Rarely, pages can have buffers and no ->mapping.A A These are
-+			A * the pages which were not successfully invalidated in
-+			A * truncate_complete_page().A A We try to drop those buffers here
-+			A * and if that worked, and the page is no longer mapped into
-+			A * process address space (page_count == 1) it can be freed.
-+			A * Otherwise, leave the page on the LRU so it is swappable.
-+			A */
++			 * If the page has buffers, try to free the buffer mappings
++			 * associated with this page. If we succeed we try to free
++			 * the page as well.
++			 *
++			 * We do this even if the page is PageDirty().
++			 * try_to_release_page() does not perform I/O, but it is
++			 * possible for a page to have PageDirty set, but it is actually
++			 * clean (all its buffers are clean).  This happens if the
++			 * buffers were written out directly, with submit_bh(). ext3
++			 * will do this, as well as the blockdev mapping.
++			 * try_to_release_page() will discover that cleanness and will
++			 * drop the buffers and mark the page clean - it can be freed.
++			 *
++			 * Rarely, pages can have buffers and no ->mapping.  These are
++			 * the pages which were not successfully invalidated in
++			 * truncate_complete_page().  We try to drop those buffers here
++			 * and if that worked, and the page is no longer mapped into
++			 * process address space (page_count == 1) it can be freed.
++			 * Otherwise, leave the page on the LRU so it is swappable.
++			 */
 +			if (page_has_private(page)) {
 +				if (!try_to_release_page(page, sc->gfp_mask)) {
 +					ret[i] = PG_ACTIVATE_LOCKED;
@@ -399,12 +399,12 @@ A
 +						continue;
 +					} else {
 +						/*
-+						A * rare race with speculative reference.
-+						A * the speculative reference will free
-+						A * this page shortly, so we may
-+						A * increment nr_reclaimed (and
-+						A * leave it off the LRU).
-+						A */
++						 * rare race with speculative reference.
++						 * the speculative reference will free
++						 * this page shortly, so we may
++						 * increment nr_reclaimed (and
++						 * leave it off the LRU).
++						 */
 +						ret[i] = PG_SPECULATIVE_REF;
 +						continue;
 +					}
@@ -413,8 +413,8 @@ A
 +lazyfree:
 +			if (!mapping) {
 +				ret[i] = PG_KEEP_LOCKED;
-A 				continue;
-A 			}
+ 				continue;
+ 			}
 -			if (!mapping && page_count(page) == 1) {
 -				unlock_page(page);
 -				if (put_page_testzero(page)) {
@@ -422,29 +422,29 @@ A 			}
 -					continue;
 -				} else {
 -					/*
--					A * rare race with speculative reference.
--					A * the speculative reference will free
--					A * this page shortly, so we may
--					A * increment nr_reclaimed (and
--					A * leave it off the LRU).
--					A */
+-					 * rare race with speculative reference.
+-					 * the speculative reference will free
+-					 * this page shortly, so we may
+-					 * increment nr_reclaimed (and
+-					 * leave it off the LRU).
+-					 */
 -					ret[i] = PG_SPECULATIVE_REF;
 +			if (!PageSwapCache(page)) {
 +				if (!__remove_mapping(mapping, page, true)) {
 +					ret[i] = PG_KEEP_LOCKED;
-A 					continue;
-A 				}
+ 					continue;
+ 				}
 +				__ClearPageLocked(page);
 +				ret[i] = PG_FREE;
 +				continue;
-A 			}
+ 			}
 +
 +			/* note pages to be unmapped */
 +			ret[i] = PG_UNKNOWN;
 +			idx[j] = i;
 +			umap_pages[j] = page;
 +			++j;
-A 		}
+ 		}
 -lazyfree:
 -		if (!mapping || !__remove_mapping(mapping, page, true)) {
 -			ret[i] = PG_KEEP_LOCKED;
@@ -462,23 +462,23 @@ A 		}
 +
 +			page = umap_pages[i];
 +			/*
-+			A * At this point, we have no other references and there is
-+			A * no way to pick any more up (removed from LRU, removed
-+			A * from pagecache). Can use non-atomic bitops now (and
-+			A * we obviously don't have to worry about waking up a process
-+			A * waiting on the page lock, because there are no references.
-+			A */
++			 * At this point, we have no other references and there is
++			 * no way to pick any more up (removed from LRU, removed
++			 * from pagecache). Can use non-atomic bitops now (and
++			 * we obviously don't have to worry about waking up a process
++			 * waiting on the page lock, because there are no references.
++			 */
 +			__ClearPageLocked(page);
 +			ret[idx[i]] = PG_FREE;
-A 		}
-A 
+ 		}
+ 
 -		/*
--		A * At this point, we have no other references and there is
--		A * no way to pick any more up (removed from LRU, removed
--		A * from pagecache). Can use non-atomic bitops now (and
--		A * we obviously don't have to worry about waking up a process
--		A * waiting on the page lock, because there are no references.
--		A */
+-		 * At this point, we have no other references and there is
+-		 * no way to pick any more up (removed from LRU, removed
+-		 * from pagecache). Can use non-atomic bitops now (and
+-		 * we obviously don't have to worry about waking up a process
+-		 * waiting on the page lock, because there are no references.
+-		 */
 -		__ClearPageLocked(page);
 -		ret[i] = PG_FREE;
 +		/* advance pointers to next batch and remaining page count */
@@ -486,14 +486,8 @@ A
 +		pages += batch_size;
 +		ret += batch_size;
 +		swap_ret += batch_size;
-A 	}
-A }
-A 
---A 
+ 	}
+ }
+ 
+-- 
 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 2c16064..e81f6c8 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -19,7 +19,7 @@
  "We created a new function __remove_swap_mapping_batch that\n"
  "allows all pages under the same swap partition to be removed\n"
  "from the swap cache's mapping in a single acquisition\n"
- "of the mapping's tree lock.A A This reduces the contention\n"
+ "of the mapping's tree lock.\302\240\302\240This reduces the contention\n"
  "on the lock when multiple threads are reclaiming\n"
  "memory by swapping to the same swap partition.\n"
  "\n"
@@ -29,20 +29,20 @@
  "\n"
  "Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>\n"
  "---\n"
- "A mm/vmscan.c | 426 ++++++++++++++++++++++++++++++++++++++++--------------------\n"
- "A 1 file changed, 286 insertions(+), 140 deletions(-)\n"
+ "\302\240mm/vmscan.c | 426 ++++++++++++++++++++++++++++++++++++++++--------------------\n"
+ "\302\2401 file changed, 286 insertions(+), 140 deletions(-)\n"
  "\n"
  "diff --git a/mm/vmscan.c b/mm/vmscan.c\n"
  "index 9fc04e1..5e4b8ce 100644\n"
  "--- a/mm/vmscan.c\n"
  "+++ b/mm/vmscan.c\n"
  "@@ -690,6 +690,103 @@ cannot_free:\n"
- "A \treturn 0;\n"
- "A }\n"
- "A \n"
+ "\302\240\treturn 0;\n"
+ "\302\240}\n"
+ "\302\240\n"
  "+/* use this only for swap mapped pages */\n"
  "+static void __remove_swap_mapping_batch(struct page *pages[],\n"
- "+\t\t\tA A A A bool reclaimed, short ret[], int nr)\n"
+ "+\t\t\t\302\240\302\240\302\240\302\240bool reclaimed, short ret[], int nr)\n"
  "+{\n"
  "+\tunsigned long flags;\n"
  "+\tstruct page *page;\n"
@@ -74,30 +74,30 @@
  "+\t\t\t\tbreak;\n"
  "+\t\t\t}\n"
  "+\t\t\t/*\n"
- "+\t\t\tA * The non racy check for a busy page.\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * Must be careful with the order of the tests. When someone has\n"
- "+\t\t\tA * a ref to the page, it may be possible that they dirty it then\n"
- "+\t\t\tA * drop the reference. So if PageDirty is tested before page_count\n"
- "+\t\t\tA * here, then the following race may occur:\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * get_user_pages(&page);\n"
- "+\t\t\tA * [user mapping goes away]\n"
- "+\t\t\tA * write_to(page);\n"
- "+\t\t\tA *\t\t\t\t!PageDirty(page)A A A A [good]\n"
- "+\t\t\tA * SetPageDirty(page);\n"
- "+\t\t\tA * put_page(page);\n"
- "+\t\t\tA *\t\t\t\t!page_count(page)A A A [good, discard it]\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * [oops, our write_to data is lost]\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * Reversing the order of the tests ensures such a situation cannot\n"
- "+\t\t\tA * escape unnoticed. The smp_rmb is needed to ensure the page->flags\n"
- "+\t\t\tA * load is not satisfied before that of page->_count.\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * Note that if SetPageDirty is always performed via set_page_dirty,\n"
- "+\t\t\tA * and thus under tree_lock, then this ordering is not required.\n"
- "+\t\t\tA */\n"
+ "+\t\t\t\302\240* The non racy check for a busy page.\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* Must be careful with the order of the tests. When someone has\n"
+ "+\t\t\t\302\240* a ref to the page, it may be possible that they dirty it then\n"
+ "+\t\t\t\302\240* drop the reference. So if PageDirty is tested before page_count\n"
+ "+\t\t\t\302\240* here, then the following race may occur:\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* get_user_pages(&page);\n"
+ "+\t\t\t\302\240* [user mapping goes away]\n"
+ "+\t\t\t\302\240* write_to(page);\n"
+ "+\t\t\t\302\240*\t\t\t\t!PageDirty(page)\302\240\302\240\302\240\302\240[good]\n"
+ "+\t\t\t\302\240* SetPageDirty(page);\n"
+ "+\t\t\t\302\240* put_page(page);\n"
+ "+\t\t\t\302\240*\t\t\t\t!page_count(page)\302\240\302\240\302\240[good, discard it]\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* [oops, our write_to data is lost]\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* Reversing the order of the tests ensures such a situation cannot\n"
+ "+\t\t\t\302\240* escape unnoticed. The smp_rmb is needed to ensure the page->flags\n"
+ "+\t\t\t\302\240* load is not satisfied before that of page->_count.\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* Note that if SetPageDirty is always performed via set_page_dirty,\n"
+ "+\t\t\t\302\240* and thus under tree_lock, then this ordering is not required.\n"
+ "+\t\t\t\302\240*/\n"
  "+\t\t\tif (!page_ref_freeze(page, 2))\n"
  "+\t\t\t\tgoto cannot_free;\n"
  "+\t\t\t/* note: atomic_cmpxchg in page_freeze_refs provides the smp_rmb */\n"
@@ -117,7 +117,7 @@
  "+\t\t}\n"
  "+\t\tspin_unlock_irqrestore(&mapping->tree_lock, flags);\n"
  "+\n"
- "+\t\t/* need to keep irq off for mem_cgroup accounting, don't restore flags yetA A */\n"
+ "+\t\t/* need to keep irq off for mem_cgroup accounting, don't restore flags yet\302\240\302\240*/\n"
  "+\t\tlocal_irq_disable();\n"
  "+\t\tfor (i = 0; i < batch_size; ++i) {\n"
  "+\t\t\tif (ret[i]) {\n"
@@ -137,20 +137,20 @@
  "+\t\tnr -= batch_size;\n"
  "+\t}\n"
  "+}\n"
- "A /*\n"
- "A  * Attempt to detach a locked page from its ->mapping.A A If it is dirty or if\n"
- "A  * someone else has a ref on the page, abort and return 0.A A If it was\n"
+ "\302\240/*\n"
+ "\302\240 * Attempt to detach a locked page from its ->mapping.\302\240\302\240If it is dirty or if\n"
+ "\302\240 * someone else has a ref on the page, abort and return 0.\302\240\302\240If it was\n"
  "@@ -897,177 +994,226 @@ static void handle_pgout_batch(struct list_head *page_list,\n"
- "A \tint nr)\n"
- "A {\n"
- "A \tstruct address_space *mapping;\n"
+ "\302\240\tint nr)\n"
+ "\302\240{\n"
+ "\302\240\tstruct address_space *mapping;\n"
  "+\tstruct page *umap_pages[SWAP_BATCH];\n"
- "A \tstruct page *page;\n"
+ "\302\240\tstruct page *page;\n"
  "-\tint i;\n"
  "-\n"
  "-\tfor (i = 0; i < nr; ++i) {\n"
  "-\t\tpage = pages[i];\n"
- "-\t\tmapping =A A page_mapping(page);\n"
+ "-\t\tmapping =\302\240\302\240page_mapping(page);\n"
  "+\tint i, j, batch_size;\n"
  "+\tshort umap_ret[SWAP_BATCH], idx[SWAP_BATCH];\n"
  "+\n"
@@ -169,17 +169,17 @@
  "+\t\t\t\t\tbreak;\n"
  "+\t\t\t\t}\n"
  "+\t\t\t} else\n"
- "+\t\t\t\tmapping =A A page_mapping(page);\n"
- "A \n"
+ "+\t\t\t\tmapping =\302\240\302\240page_mapping(page);\n"
+ "\302\240\n"
  "-\t\t/* check outcome of cache addition */\n"
  "-\t\tif (!ret[i]) {\n"
  "-\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
  "-\t\t\tcontinue;\n"
  "-\t\t}\n"
  "-\t\t/*\n"
- "-\t\tA * The page is mapped into the page tables of one or more\n"
- "-\t\tA * processes. Try to unmap it here.\n"
- "-\t\tA */\n"
+ "-\t\t\302\240* The page is mapped into the page tables of one or more\n"
+ "-\t\t\302\240* processes. Try to unmap it here.\n"
+ "-\t\t\302\240*/\n"
  "-\t\tif (page_mapped(page) && mapping) {\n"
  "-\t\t\tswitch (swap_ret[i] = try_to_unmap(page, lazyfree ?\n"
  "-\t\t\t\t(ttu_flags | TTU_BATCH_FLUSH | TTU_LZFREE) :\n"
@@ -187,8 +187,8 @@
  "-\t\t\tcase SWAP_FAIL:\n"
  "+\t\t\t/* check outcome of cache addition */\n"
  "+\t\t\tif (!ret[i]) {\n"
- "A \t\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
- "A \t\t\t\tcontinue;\n"
+ "\302\240\t\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
+ "\302\240\t\t\t\tcontinue;\n"
  "-\t\t\tcase SWAP_AGAIN:\n"
  "-\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
  "-\t\t\t\tcontinue;\n"
@@ -199,20 +199,20 @@
  "-\t\t\t\tgoto lazyfree;\n"
  "-\t\t\tcase SWAP_SUCCESS:\n"
  "-\t\t\t\t; /* try to free the page below */\n"
- "A \t\t\t}\n"
+ "\302\240\t\t\t}\n"
  "-\t\t}\n"
  "-\n"
  "-\t\tif (PageDirty(page)) {\n"
- "A \t\t\t/*\n"
- "-\t\t\tA * Only kswapd can writeback filesystem pages to\n"
- "-\t\t\tA * avoid risk of stack overflow but only writeback\n"
- "-\t\t\tA * if many dirty pages have been encountered.\n"
- "+\t\t\tA * The page is mapped into the page tables of one or more\n"
- "+\t\t\tA * processes. Try to unmap it here.\n"
- "A \t\t\tA */\n"
+ "\302\240\t\t\t/*\n"
+ "-\t\t\t\302\240* Only kswapd can writeback filesystem pages to\n"
+ "-\t\t\t\302\240* avoid risk of stack overflow but only writeback\n"
+ "-\t\t\t\302\240* if many dirty pages have been encountered.\n"
+ "+\t\t\t\302\240* The page is mapped into the page tables of one or more\n"
+ "+\t\t\t\302\240* processes. Try to unmap it here.\n"
+ "\302\240\t\t\t\302\240*/\n"
  "-\t\t\tif (page_is_file_cache(page) &&\n"
  "-\t\t\t\t\t(!current_is_kswapd() ||\n"
- "-\t\t\t\t\tA !test_bit(ZONE_DIRTY, &zone->flags))) {\n"
+ "-\t\t\t\t\t\302\240!test_bit(ZONE_DIRTY, &zone->flags))) {\n"
  "+\t\t\tif (page_mapped(page) && mapping) {\n"
  "+\t\t\t\tswitch (swap_ret[i] = try_to_unmap(page, lazyfree ?\n"
  "+\t\t\t\t\t(ttu_flags | TTU_BATCH_FLUSH | TTU_LZFREE) :\n"
@@ -234,15 +234,15 @@
  "+\t\t\t}\n"
  "+\n"
  "+\t\t\tif (PageDirty(page)) {\n"
- "A \t\t\t\t/*\n"
- "-\t\t\t\tA * Immediately reclaim when written back.\n"
- "-\t\t\t\tA * Similar in principal to deactivate_page()\n"
- "-\t\t\t\tA * except we already have the page isolated\n"
- "-\t\t\t\tA * and know it's dirty\n"
- "+\t\t\t\tA * Only kswapd can writeback filesystem pages to\n"
- "+\t\t\t\tA * avoid risk of stack overflow but only writeback\n"
- "+\t\t\t\tA * if many dirty pages have been encountered.\n"
- "A \t\t\t\tA */\n"
+ "\302\240\t\t\t\t/*\n"
+ "-\t\t\t\t\302\240* Immediately reclaim when written back.\n"
+ "-\t\t\t\t\302\240* Similar in principal to deactivate_page()\n"
+ "-\t\t\t\t\302\240* except we already have the page isolated\n"
+ "-\t\t\t\t\302\240* and know it's dirty\n"
+ "+\t\t\t\t\302\240* Only kswapd can writeback filesystem pages to\n"
+ "+\t\t\t\t\302\240* avoid risk of stack overflow but only writeback\n"
+ "+\t\t\t\t\302\240* if many dirty pages have been encountered.\n"
+ "\302\240\t\t\t\t\302\240*/\n"
  "-\t\t\t\tinc_zone_page_state(page, NR_VMSCAN_IMMEDIATE);\n"
  "-\t\t\t\tSetPageReclaim(page);\n"
  "-\n"
@@ -251,16 +251,16 @@
  "-\t\t\t}\n"
  "+\t\t\t\tif (page_is_file_cache(page) &&\n"
  "+\t\t\t\t\t\t(!current_is_kswapd() ||\n"
- "+\t\t\t\t\t\tA !test_bit(ZONE_DIRTY, &zone->flags))) {\n"
+ "+\t\t\t\t\t\t\302\240!test_bit(ZONE_DIRTY, &zone->flags))) {\n"
  "+\t\t\t\t\t/*\n"
- "+\t\t\t\t\tA * Immediately reclaim when written back.\n"
- "+\t\t\t\t\tA * Similar in principal to deactivate_page()\n"
- "+\t\t\t\t\tA * except we already have the page isolated\n"
- "+\t\t\t\t\tA * and know it's dirty\n"
- "+\t\t\t\t\tA */\n"
+ "+\t\t\t\t\t\302\240* Immediately reclaim when written back.\n"
+ "+\t\t\t\t\t\302\240* Similar in principal to deactivate_page()\n"
+ "+\t\t\t\t\t\302\240* except we already have the page isolated\n"
+ "+\t\t\t\t\t\302\240* and know it's dirty\n"
+ "+\t\t\t\t\t\302\240*/\n"
  "+\t\t\t\t\tinc_zone_page_state(page, NR_VMSCAN_IMMEDIATE);\n"
  "+\t\t\t\t\tSetPageReclaim(page);\n"
- "A \n"
+ "\302\240\n"
  "-\t\t\tif (references == PAGEREF_RECLAIM_CLEAN) {\n"
  "-\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
  "-\t\t\t\tcontinue;\n"
@@ -276,12 +276,12 @@
  "+\t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
  "+\t\t\t\t\tcontinue;\n"
  "+\t\t\t\t}\n"
- "A \n"
+ "\302\240\n"
  "-\t\t\t/*\n"
- "-\t\t\tA * Page is dirty. Flush the TLB if a writable entry\n"
- "-\t\t\tA * potentially exists to avoid CPU writes after IO\n"
- "-\t\t\tA * starts and then write it out here.\n"
- "-\t\t\tA */\n"
+ "-\t\t\t\302\240* Page is dirty. Flush the TLB if a writable entry\n"
+ "-\t\t\t\302\240* potentially exists to avoid CPU writes after IO\n"
+ "-\t\t\t\302\240* starts and then write it out here.\n"
+ "-\t\t\t\302\240*/\n"
  "-\t\t\ttry_to_unmap_flush_dirty();\n"
  "-\t\t\tswitch (pageout(page, mapping, sc)) {\n"
  "-\t\t\tcase PAGE_KEEP:\n"
@@ -299,22 +299,22 @@
  "+\t\t\t\t}\n"
  "+\t\t\t\tif (!may_enter_fs) {\n"
  "+\t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
- "A \t\t\t\t\tcontinue;\n"
- "A \t\t\t\t}\n"
+ "\302\240\t\t\t\t\tcontinue;\n"
+ "\302\240\t\t\t\t}\n"
  "-\t\t\t\tif (PageDirty(page)) {\n"
  "-\t\t\t\t\tret[i] = PG_KEEP;\n"
  "+\t\t\t\tif (!sc->may_writepage) {\n"
  "+\t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
- "A \t\t\t\t\tcontinue;\n"
- "A \t\t\t\t}\n"
- "A \n"
- "A \t\t\t\t/*\n"
- "-\t\t\t\tA * A synchronous write - probably a ramdisk.A A Go\n"
- "-\t\t\t\tA * ahead and try to reclaim the page.\n"
- "+\t\t\t\tA * Page is dirty. Flush the TLB if a writable entry\n"
- "+\t\t\t\tA * potentially exists to avoid CPU writes after IO\n"
- "+\t\t\t\tA * starts and then write it out here.\n"
- "A \t\t\t\tA */\n"
+ "\302\240\t\t\t\t\tcontinue;\n"
+ "\302\240\t\t\t\t}\n"
+ "\302\240\n"
+ "\302\240\t\t\t\t/*\n"
+ "-\t\t\t\t\302\240* A synchronous write - probably a ramdisk.\302\240\302\240Go\n"
+ "-\t\t\t\t\302\240* ahead and try to reclaim the page.\n"
+ "+\t\t\t\t\302\240* Page is dirty. Flush the TLB if a writable entry\n"
+ "+\t\t\t\t\302\240* potentially exists to avoid CPU writes after IO\n"
+ "+\t\t\t\t\302\240* starts and then write it out here.\n"
+ "\302\240\t\t\t\t\302\240*/\n"
  "-\t\t\t\tif (!trylock_page(page)) {\n"
  "-\t\t\t\t\tret[i] = PG_KEEP;\n"
  "-\t\t\t\t\tcontinue;\n"
@@ -323,8 +323,8 @@
  "+\t\t\t\ttry_to_unmap_flush_dirty();\n"
  "+\t\t\t\tswitch (pageout(page, mapping, sc)) {\n"
  "+\t\t\t\tcase PAGE_KEEP:\n"
- "A \t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
- "A \t\t\t\t\tcontinue;\n"
+ "\302\240\t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
+ "\302\240\t\t\t\t\tcontinue;\n"
  "+\t\t\t\tcase PAGE_ACTIVATE:\n"
  "+\t\t\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
  "+\t\t\t\t\tcontinue;\n"
@@ -339,9 +339,9 @@
  "+\t\t\t\t\t}\n"
  "+\n"
  "+\t\t\t\t\t/*\n"
- "+\t\t\t\t\tA * A synchronous write - probably a ramdisk.A A Go\n"
- "+\t\t\t\t\tA * ahead and try to reclaim the page.\n"
- "+\t\t\t\t\tA */\n"
+ "+\t\t\t\t\t\302\240* A synchronous write - probably a ramdisk.\302\240\302\240Go\n"
+ "+\t\t\t\t\t\302\240* ahead and try to reclaim the page.\n"
+ "+\t\t\t\t\t\302\240*/\n"
  "+\t\t\t\t\tif (!trylock_page(page)) {\n"
  "+\t\t\t\t\t\tret[i] = PG_KEEP;\n"
  "+\t\t\t\t\t\tcontinue;\n"
@@ -353,58 +353,58 @@
  "+\t\t\t\t\tmapping = page_mapping(page);\n"
  "+\t\t\t\tcase PAGE_CLEAN:\n"
  "+\t\t\t\t\t; /* try to free the page below */\n"
- "A \t\t\t\t}\n"
+ "\302\240\t\t\t\t}\n"
  "-\t\t\t\tmapping = page_mapping(page);\n"
  "-\t\t\tcase PAGE_CLEAN:\n"
  "-\t\t\t\t; /* try to free the page below */\n"
- "A \t\t\t}\n"
+ "\302\240\t\t\t}\n"
  "-\t\t}\n"
- "A \n"
+ "\302\240\n"
  "-\t\t/*\n"
- "-\t\tA * If the page has buffers, try to free the buffer mappings\n"
- "-\t\tA * associated with this page. If we succeed we try to free\n"
- "-\t\tA * the page as well.\n"
- "-\t\tA *\n"
- "-\t\tA * We do this even if the page is PageDirty().\n"
- "-\t\tA * try_to_release_page() does not perform I/O, but it is\n"
- "-\t\tA * possible for a page to have PageDirty set, but it is actually\n"
- "-\t\tA * clean (all its buffers are clean).A A This happens if the\n"
- "-\t\tA * buffers were written out directly, with submit_bh(). ext3\n"
- "-\t\tA * will do this, as well as the blockdev mapping.\n"
- "-\t\tA * try_to_release_page() will discover that cleanness and will\n"
- "-\t\tA * drop the buffers and mark the page clean - it can be freed.\n"
- "-\t\tA *\n"
- "-\t\tA * Rarely, pages can have buffers and no ->mapping.A A These are\n"
- "-\t\tA * the pages which were not successfully invalidated in\n"
- "-\t\tA * truncate_complete_page().A A We try to drop those buffers here\n"
- "-\t\tA * and if that worked, and the page is no longer mapped into\n"
- "-\t\tA * process address space (page_count == 1) it can be freed.\n"
- "-\t\tA * Otherwise, leave the page on the LRU so it is swappable.\n"
- "-\t\tA */\n"
+ "-\t\t\302\240* If the page has buffers, try to free the buffer mappings\n"
+ "-\t\t\302\240* associated with this page. If we succeed we try to free\n"
+ "-\t\t\302\240* the page as well.\n"
+ "-\t\t\302\240*\n"
+ "-\t\t\302\240* We do this even if the page is PageDirty().\n"
+ "-\t\t\302\240* try_to_release_page() does not perform I/O, but it is\n"
+ "-\t\t\302\240* possible for a page to have PageDirty set, but it is actually\n"
+ "-\t\t\302\240* clean (all its buffers are clean).\302\240\302\240This happens if the\n"
+ "-\t\t\302\240* buffers were written out directly, with submit_bh(). ext3\n"
+ "-\t\t\302\240* will do this, as well as the blockdev mapping.\n"
+ "-\t\t\302\240* try_to_release_page() will discover that cleanness and will\n"
+ "-\t\t\302\240* drop the buffers and mark the page clean - it can be freed.\n"
+ "-\t\t\302\240*\n"
+ "-\t\t\302\240* Rarely, pages can have buffers and no ->mapping.\302\240\302\240These are\n"
+ "-\t\t\302\240* the pages which were not successfully invalidated in\n"
+ "-\t\t\302\240* truncate_complete_page().\302\240\302\240We try to drop those buffers here\n"
+ "-\t\t\302\240* and if that worked, and the page is no longer mapped into\n"
+ "-\t\t\302\240* process address space (page_count == 1) it can be freed.\n"
+ "-\t\t\302\240* Otherwise, leave the page on the LRU so it is swappable.\n"
+ "-\t\t\302\240*/\n"
  "-\t\tif (page_has_private(page)) {\n"
  "-\t\t\tif (!try_to_release_page(page, sc->gfp_mask)) {\n"
  "-\t\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
  "+\t\t\t/*\n"
- "+\t\t\tA * If the page has buffers, try to free the buffer mappings\n"
- "+\t\t\tA * associated with this page. If we succeed we try to free\n"
- "+\t\t\tA * the page as well.\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * We do this even if the page is PageDirty().\n"
- "+\t\t\tA * try_to_release_page() does not perform I/O, but it is\n"
- "+\t\t\tA * possible for a page to have PageDirty set, but it is actually\n"
- "+\t\t\tA * clean (all its buffers are clean).A A This happens if the\n"
- "+\t\t\tA * buffers were written out directly, with submit_bh(). ext3\n"
- "+\t\t\tA * will do this, as well as the blockdev mapping.\n"
- "+\t\t\tA * try_to_release_page() will discover that cleanness and will\n"
- "+\t\t\tA * drop the buffers and mark the page clean - it can be freed.\n"
- "+\t\t\tA *\n"
- "+\t\t\tA * Rarely, pages can have buffers and no ->mapping.A A These are\n"
- "+\t\t\tA * the pages which were not successfully invalidated in\n"
- "+\t\t\tA * truncate_complete_page().A A We try to drop those buffers here\n"
- "+\t\t\tA * and if that worked, and the page is no longer mapped into\n"
- "+\t\t\tA * process address space (page_count == 1) it can be freed.\n"
- "+\t\t\tA * Otherwise, leave the page on the LRU so it is swappable.\n"
- "+\t\t\tA */\n"
+ "+\t\t\t\302\240* If the page has buffers, try to free the buffer mappings\n"
+ "+\t\t\t\302\240* associated with this page. If we succeed we try to free\n"
+ "+\t\t\t\302\240* the page as well.\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* We do this even if the page is PageDirty().\n"
+ "+\t\t\t\302\240* try_to_release_page() does not perform I/O, but it is\n"
+ "+\t\t\t\302\240* possible for a page to have PageDirty set, but it is actually\n"
+ "+\t\t\t\302\240* clean (all its buffers are clean).\302\240\302\240This happens if the\n"
+ "+\t\t\t\302\240* buffers were written out directly, with submit_bh(). ext3\n"
+ "+\t\t\t\302\240* will do this, as well as the blockdev mapping.\n"
+ "+\t\t\t\302\240* try_to_release_page() will discover that cleanness and will\n"
+ "+\t\t\t\302\240* drop the buffers and mark the page clean - it can be freed.\n"
+ "+\t\t\t\302\240*\n"
+ "+\t\t\t\302\240* Rarely, pages can have buffers and no ->mapping.\302\240\302\240These are\n"
+ "+\t\t\t\302\240* the pages which were not successfully invalidated in\n"
+ "+\t\t\t\302\240* truncate_complete_page().\302\240\302\240We try to drop those buffers here\n"
+ "+\t\t\t\302\240* and if that worked, and the page is no longer mapped into\n"
+ "+\t\t\t\302\240* process address space (page_count == 1) it can be freed.\n"
+ "+\t\t\t\302\240* Otherwise, leave the page on the LRU so it is swappable.\n"
+ "+\t\t\t\302\240*/\n"
  "+\t\t\tif (page_has_private(page)) {\n"
  "+\t\t\t\tif (!try_to_release_page(page, sc->gfp_mask)) {\n"
  "+\t\t\t\t\tret[i] = PG_ACTIVATE_LOCKED;\n"
@@ -417,12 +417,12 @@
  "+\t\t\t\t\t\tcontinue;\n"
  "+\t\t\t\t\t} else {\n"
  "+\t\t\t\t\t\t/*\n"
- "+\t\t\t\t\t\tA * rare race with speculative reference.\n"
- "+\t\t\t\t\t\tA * the speculative reference will free\n"
- "+\t\t\t\t\t\tA * this page shortly, so we may\n"
- "+\t\t\t\t\t\tA * increment nr_reclaimed (and\n"
- "+\t\t\t\t\t\tA * leave it off the LRU).\n"
- "+\t\t\t\t\t\tA */\n"
+ "+\t\t\t\t\t\t\302\240* rare race with speculative reference.\n"
+ "+\t\t\t\t\t\t\302\240* the speculative reference will free\n"
+ "+\t\t\t\t\t\t\302\240* this page shortly, so we may\n"
+ "+\t\t\t\t\t\t\302\240* increment nr_reclaimed (and\n"
+ "+\t\t\t\t\t\t\302\240* leave it off the LRU).\n"
+ "+\t\t\t\t\t\t\302\240*/\n"
  "+\t\t\t\t\t\tret[i] = PG_SPECULATIVE_REF;\n"
  "+\t\t\t\t\t\tcontinue;\n"
  "+\t\t\t\t\t}\n"
@@ -431,8 +431,8 @@
  "+lazyfree:\n"
  "+\t\t\tif (!mapping) {\n"
  "+\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
- "A \t\t\t\tcontinue;\n"
- "A \t\t\t}\n"
+ "\302\240\t\t\t\tcontinue;\n"
+ "\302\240\t\t\t}\n"
  "-\t\t\tif (!mapping && page_count(page) == 1) {\n"
  "-\t\t\t\tunlock_page(page);\n"
  "-\t\t\t\tif (put_page_testzero(page)) {\n"
@@ -440,29 +440,29 @@
  "-\t\t\t\t\tcontinue;\n"
  "-\t\t\t\t} else {\n"
  "-\t\t\t\t\t/*\n"
- "-\t\t\t\t\tA * rare race with speculative reference.\n"
- "-\t\t\t\t\tA * the speculative reference will free\n"
- "-\t\t\t\t\tA * this page shortly, so we may\n"
- "-\t\t\t\t\tA * increment nr_reclaimed (and\n"
- "-\t\t\t\t\tA * leave it off the LRU).\n"
- "-\t\t\t\t\tA */\n"
+ "-\t\t\t\t\t\302\240* rare race with speculative reference.\n"
+ "-\t\t\t\t\t\302\240* the speculative reference will free\n"
+ "-\t\t\t\t\t\302\240* this page shortly, so we may\n"
+ "-\t\t\t\t\t\302\240* increment nr_reclaimed (and\n"
+ "-\t\t\t\t\t\302\240* leave it off the LRU).\n"
+ "-\t\t\t\t\t\302\240*/\n"
  "-\t\t\t\t\tret[i] = PG_SPECULATIVE_REF;\n"
  "+\t\t\tif (!PageSwapCache(page)) {\n"
  "+\t\t\t\tif (!__remove_mapping(mapping, page, true)) {\n"
  "+\t\t\t\t\tret[i] = PG_KEEP_LOCKED;\n"
- "A \t\t\t\t\tcontinue;\n"
- "A \t\t\t\t}\n"
+ "\302\240\t\t\t\t\tcontinue;\n"
+ "\302\240\t\t\t\t}\n"
  "+\t\t\t\t__ClearPageLocked(page);\n"
  "+\t\t\t\tret[i] = PG_FREE;\n"
  "+\t\t\t\tcontinue;\n"
- "A \t\t\t}\n"
+ "\302\240\t\t\t}\n"
  "+\n"
  "+\t\t\t/* note pages to be unmapped */\n"
  "+\t\t\tret[i] = PG_UNKNOWN;\n"
  "+\t\t\tidx[j] = i;\n"
  "+\t\t\tumap_pages[j] = page;\n"
  "+\t\t\t++j;\n"
- "A \t\t}\n"
+ "\302\240\t\t}\n"
  "-lazyfree:\n"
  "-\t\tif (!mapping || !__remove_mapping(mapping, page, true)) {\n"
  "-\t\t\tret[i] = PG_KEEP_LOCKED;\n"
@@ -480,23 +480,23 @@
  "+\n"
  "+\t\t\tpage = umap_pages[i];\n"
  "+\t\t\t/*\n"
- "+\t\t\tA * At this point, we have no other references and there is\n"
- "+\t\t\tA * no way to pick any more up (removed from LRU, removed\n"
- "+\t\t\tA * from pagecache). Can use non-atomic bitops now (and\n"
- "+\t\t\tA * we obviously don't have to worry about waking up a process\n"
- "+\t\t\tA * waiting on the page lock, because there are no references.\n"
- "+\t\t\tA */\n"
+ "+\t\t\t\302\240* At this point, we have no other references and there is\n"
+ "+\t\t\t\302\240* no way to pick any more up (removed from LRU, removed\n"
+ "+\t\t\t\302\240* from pagecache). Can use non-atomic bitops now (and\n"
+ "+\t\t\t\302\240* we obviously don't have to worry about waking up a process\n"
+ "+\t\t\t\302\240* waiting on the page lock, because there are no references.\n"
+ "+\t\t\t\302\240*/\n"
  "+\t\t\t__ClearPageLocked(page);\n"
  "+\t\t\tret[idx[i]] = PG_FREE;\n"
- "A \t\t}\n"
- "A \n"
+ "\302\240\t\t}\n"
+ "\302\240\n"
  "-\t\t/*\n"
- "-\t\tA * At this point, we have no other references and there is\n"
- "-\t\tA * no way to pick any more up (removed from LRU, removed\n"
- "-\t\tA * from pagecache). Can use non-atomic bitops now (and\n"
- "-\t\tA * we obviously don't have to worry about waking up a process\n"
- "-\t\tA * waiting on the page lock, because there are no references.\n"
- "-\t\tA */\n"
+ "-\t\t\302\240* At this point, we have no other references and there is\n"
+ "-\t\t\302\240* no way to pick any more up (removed from LRU, removed\n"
+ "-\t\t\302\240* from pagecache). Can use non-atomic bitops now (and\n"
+ "-\t\t\302\240* we obviously don't have to worry about waking up a process\n"
+ "-\t\t\302\240* waiting on the page lock, because there are no references.\n"
+ "-\t\t\302\240*/\n"
  "-\t\t__ClearPageLocked(page);\n"
  "-\t\tret[i] = PG_FREE;\n"
  "+\t\t/* advance pointers to next batch and remaining page count */\n"
@@ -504,16 +504,10 @@
  "+\t\tpages += batch_size;\n"
  "+\t\tret += batch_size;\n"
  "+\t\tswap_ret += batch_size;\n"
- "A \t}\n"
- "A }\n"
- "A \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}\n"
+ "\302\240}\n"
+ "\302\240\n"
+ "--\302\240\n"
+ 2.5.5
 
-98ef93f377dab10ad67f289b921cb5e8c6b9f0073c576f6b28145f4638863e04
+59998de1a2a534d75e30477e2228b36f1de1b41a36870ae9d031fe6cbfd44c4d

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.