+ mm-khugepaged-skip-huge-page-collapse-for-special-files-fix.patch added to -mm tree

From: akpm@linux-foundation.org
Date: 2021-10-27 20:56:46

The patch titled
     Subject: mm-khugepaged-skip-huge-page-collapse-for-special-files-fix
has been added to the -mm tree.  Its filename is
     mm-khugepaged-skip-huge-page-collapse-for-special-files-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-khugepaged-skip-huge-page-collapse-for-special-files-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-khugepaged-skip-huge-page-collapse-for-special-files-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yang Shi <redacted>
Subject: mm-khugepaged-skip-huge-page-collapse-for-special-files-fix

fix vm_file check

Link: https://lkml.kernel.org/r/CAHbLzkqTW9U3VvTu1Ki5v_cLRC9gHW+znBukg_ycergE0JWj-A@mail.gmail.com
Cc: Andrea Righi <redacted>
Cc: Hao Sun <redacted>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kirill A. Shutemov <redacted>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Song Liu <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/khugepaged.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/khugepaged.c~mm-khugepaged-skip-huge-page-collapse-for-special-files-fix
+++ a/mm/khugepaged.c
@@ -445,9 +445,9 @@ static bool hugepage_vma_check(struct vm
 	if (!transhuge_vma_enabled(vma, vm_flags))
 		return false;
 
-	if (vma->vm_file)
-		return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff,
-				HPAGE_PMD_NR);
+	if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) -
+				vma->vm_pgoff, HPAGE_PMD_NR))
+		return false;
 
 	/* Enabled via shmem mount options or sysfs settings. */
 	if (shmem_file(vma->vm_file))
_

Patches currently in -mm which might be from shy828301@gmail.com are

mm-hwpoison-remove-the-unnecessary-thp-check.patch
mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault.patch
mm-khugepaged-skip-huge-page-collapse-for-special-files.patch
mm-khugepaged-skip-huge-page-collapse-for-special-files-fix.patch
mm-filemap-coding-style-cleanup-for-filemap_map_pmd.patch
mm-hwpoison-refactor-refcount-check-handling.patch
mm-shmem-dont-truncate-page-if-memory-failure-happens.patch
mm-hwpoison-handle-non-anonymous-thp-correctly.patch
mm-migrate-make-demotion-knob-depend-on-migration.patch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help