Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428706

[RFC PATCH v2 3/3] mm, thp: fix comment inconsistency for swapin readahead functions

From Ebru Akagunduz <ebru.akagunduz@gmail.com>
Newsgroups linux.kernel
Subject [RFC PATCH v2 3/3] mm, thp: fix comment inconsistency for swapin readahead functions
Date 2016-06-22 13:40 +0200
Message-ID <rMOFH-2MC-11@gated-at.bofh.it> (permalink)
References <rMOml-2Gn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


After fixing swapin issues, comment lines stayed as in old version.
This patch updates the comments.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reported-by: Hillf Danton <hillf.zj@alibaba-inc.com>
---
Changes in v2:
 - Newly created in this version.

 mm/huge_memory.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index ff96765..5cb0fd9 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2441,8 +2441,8 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm,
 		/* do_swap_page returns VM_FAULT_RETRY with released mmap_sem */
 		if (ret & VM_FAULT_RETRY) {
 			down_read(&mm->mmap_sem);
-			/* vma is no longer available, don't continue to swapin */
 			if (hugepage_vma_revalidate(mm, address)) {
+				/* vma is no longer available, don't continue to swapin */
 				trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 0);
 				return false;
 			}
@@ -2512,8 +2512,8 @@ static void collapse_huge_page(struct mm_struct *mm,
 
 	/*
 	 * __collapse_huge_page_swapin always returns with mmap_sem
-	 * locked.  If it fails, release mmap_sem and jump directly
-	 * out.  Continuing to collapse causes inconsistency.
+	 * locked. If it fails, we release mmap_sem and jump out_nolock.
+	 * Continuing to collapse causes inconsistency.
 	 */
 	if (!__collapse_huge_page_swapin(mm, vma, address, pmd, referenced)) {
 		mem_cgroup_cancel_charge(new_page, memcg, true);
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH v2 0/3] mm, thp: convert from optimistic swapin collapsing to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-22 13:20 +0200
  [RFC PATCH v2 1/3] mm, thp: revert allocstall comparing Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-22 13:20 +0200
  [RFC PATCH v2 2/3] mm, thp: convert from optimistic swapin collapsing to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-22 13:20 +0200
  [RFC PATCH v2 3/3] mm, thp: fix comment inconsistency for swapin readahead functions Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-22 13:40 +0200

csiph-web