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


Groups > linux.kernel > #1439998

[PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions

From Ebru Akagunduz <ebru.akagunduz@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions
Date 2016-07-10 02:10 +0200
Message-ID <rTatP-1sv-7@gated-at.bofh.it> (permalink)
References <rTatP-1sv-1@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>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
---
Changes in v2:
 - Newly created in this version.

Changes in v3:
 - Replace Reported-by with Cc (Hillf Danton)
 - Remove RFC tag (Hillf Danton)
 - After khugepaged extracted from huge_memory.c,
   changes moved to khugepaged.c

 mm/khugepaged.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 93d5f87..5661484 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -891,9 +891,10 @@ 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))
+			if (hugepage_vma_revalidate(mm, address)) {
+				/* vma is no longer available, don't continue to swapin */
 				return false;
+			}
 			/* check if the pmd is still valid */
 			if (mm_find_pmd(mm, address) != pmd)
 				return false;
@@ -969,7 +970,7 @@ 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.
+	 * 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)) {
-- 
1.9.1

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


Thread

[RFC PATCH v3 0/2] mm, thp: convert from optimistic swapin collapsing to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-07-10 02:10 +0200
  [PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-07-10 02:10 +0200
    Re: [PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin  readahead functions Rik van Riel <riel@redhat.com> - 2016-07-20 16:20 +0200
  [RFC PATCH v3 2/2] mm, thp: convert from optimistic swapin collapsing to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-07-10 02:20 +0200
    Re: [RFC PATCH v3 2/2] mm, thp: convert from optimistic swapin  collapsing to conservative Rik van Riel <riel@redhat.com> - 2016-07-20 16:20 +0200

csiph-web