+ mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/hmm: move THP and hugetlbfs code path behind #if KCONFIG
has been added to the -mm tree.  Its filename is
     mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-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: Jérôme Glisse <jglisse@xxxxxxxxxx>
Subject: mm/hmm: move THP and hugetlbfs code path behind #if KCONFIG

To avoid any undefined symbol build warning or error, move THP and
hugetlbfs code behind kconfig #if/#else/#endif against appropriate Kconfig
option.

Link: http://lkml.kernel.org/r/20190422163741.13029-1-jglisse@xxxxxxxxxx
Signed-off-by: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Ralph Campbell <rcampbell@xxxxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/hmm.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/mm/hmm.c~mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-fix
+++ a/mm/hmm.c
@@ -519,6 +519,7 @@ static int hmm_vma_handle_pmd(struct mm_
 			      uint64_t *pfns,
 			      pmd_t pmd)
 {
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 	struct hmm_vma_walk *hmm_vma_walk = walk->private;
 	struct hmm_range *range = hmm_vma_walk->range;
 	unsigned long pfn, npages, i;
@@ -549,6 +550,10 @@ static int hmm_vma_handle_pmd(struct mm_
 	}
 	hmm_vma_walk->last = end;
 	return 0;
+#else
+	/* If THP is not enabled then we should never reach that code ! */
+	return -EINVAL;
+#endif
 }
 
 static inline uint64_t pte_to_hmm_pfn_flags(struct hmm_range *range, pte_t pte)
@@ -790,6 +795,7 @@ again:
 			return hmm_vma_walk_hole_(addr, end, fault,
 						write_fault, walk);
 
+#ifdef CONFIG_HUGETLB_PAGE
 		pfn = pud_pfn(pud) + ((addr & ~PUD_MASK) >> PAGE_SHIFT);
 		for (i = 0; i < npages; ++i, ++pfn) {
 			hmm_vma_walk->pgmap = get_dev_pagemap(pfn,
@@ -804,6 +810,9 @@ again:
 		}
 		hmm_vma_walk->last = end;
 		return 0;
+#else
+		return -EINVAL;
+#endif
 	}
 
 	split_huge_pud(walk->vma, pudp, addr);
_

Patches currently in -mm which might be from jglisse@xxxxxxxxxx are

zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch
mm-hmm-select-mmu-notifier-when-selecting-hmm-v2.patch
mm-hmm-use-reference-counting-for-hmm-struct-v3.patch
mm-hmm-do-not-erase-snapshot-when-a-range-is-invalidated.patch
mm-hmm-improve-and-rename-hmm_vma_get_pfns-to-hmm_range_snapshot-v2.patch
mm-hmm-improve-and-rename-hmm_vma_fault-to-hmm_range_fault-v3.patch
mm-hmm-improve-driver-api-to-work-and-wait-over-a-range-v3.patch
mm-hmm-add-default-fault-flags-to-avoid-the-need-to-pre-fill-pfns-arrays-v2.patch
mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3.patch
mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3.patch
mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3-fix.patch
mm-hmm-add-helpers-to-test-if-mm-is-still-alive-or-not.patch
mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3.patch
mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3-fix.patch
mm-hmm-convert-various-hmm_pfn_-to-device_entry-which-is-a-better-name.patch
mm-mmu_notifier-helper-to-test-if-a-range-invalidation-is-blockable.patch
mm-mmu_notifier-convert-user-range-blockable-to-helper-function.patch
mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch
mm-mmu_notifier-contextual-information-for-event-enums.patch
mm-mmu_notifier-contextual-information-for-event-triggering-invalidation-v2.patch
mm-mmu_notifier-use-correct-mmu_notifier-events-for-each-invalidation.patch
mm-mmu_notifier-pass-down-vma-and-reasons-why-mmu-notifier-is-happening-v2.patch
mm-mmu_notifier-mmu_notifier_range_update_to_read_only-helper.patch
mm-hmm-add-arch_has_hmm_mirror-arch_has_hmm_device-kconfig.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux