Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2019-01-14 10:07:57 +0100
committerVlastimil Babka <vbabka@suse.cz>2019-01-14 10:08:06 +0100
commit8abf09c7b00f5fd52c38e31046eb19c402a38db0 (patch)
tree3459b988f3a007f894d80e49b258ba78875490b7
parenta6911c547684e7aca31ab298c0be4e99d9ca6512 (diff)
mm/huge_memory: rename freeze_page() to unmap_page() (VM
Functionality, bsc#1121599).
-rw-r--r--patches.fixes/mm-huge_memory-rename-freeze_page-to-unmap_page.patch87
-rw-r--r--series.conf1
2 files changed, 88 insertions, 0 deletions
diff --git a/patches.fixes/mm-huge_memory-rename-freeze_page-to-unmap_page.patch b/patches.fixes/mm-huge_memory-rename-freeze_page-to-unmap_page.patch
new file mode 100644
index 0000000000..9106bc3635
--- /dev/null
+++ b/patches.fixes/mm-huge_memory-rename-freeze_page-to-unmap_page.patch
@@ -0,0 +1,87 @@
+From: Hugh Dickins <hughd@google.com>
+Date: Fri, 30 Nov 2018 14:10:13 -0800
+Subject: mm/huge_memory: rename freeze_page() to unmap_page()
+Git-commit: 906f9cdfc2a0800f13683f9e4ebdfd08c12ee81b
+Patch-mainline: v4.20-rc5
+References: VM Functionality, bsc#1121599
+
+The term "freeze" is used in several ways in the kernel, and in mm it
+has the particular meaning of forcing page refcount temporarily to 0.
+freeze_page() is just too confusing a name for a function that unmaps a
+page: rename it unmap_page(), and rename unfreeze_page() remap_page().
+
+Went to change the mention of freeze_page() added later in mm/rmap.c,
+but found it to be incorrect: ordinary page reclaim reaches there too;
+but the substance of the comment still seems correct, so edit it down.
+
+Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261514080.2275@eggly.anvils
+Fixes: e9b61f19858a5 ("thp: reintroduce split_huge_page()")
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
+Cc: Jerome Glisse <jglisse@redhat.com>
+Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Cc: Matthew Wilcox <willy@infradead.org>
+Cc: <stable@vger.kernel.org> [4.8+]
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+---
+ mm/huge_memory.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -2179,7 +2179,7 @@ void vma_adjust_trans_huge(struct vm_are
+ }
+ }
+
+-static void freeze_page(struct page *page)
++static void unmap_page(struct page *page)
+ {
+ enum ttu_flags ttu_flags = TTU_IGNORE_MLOCK | TTU_IGNORE_ACCESS |
+ TTU_RMAP_LOCKED | TTU_SPLIT_HUGE_PMD;
+@@ -2194,7 +2194,7 @@ static void freeze_page(struct page *pag
+ VM_BUG_ON_PAGE(!unmap_success, page);
+ }
+
+-static void unfreeze_page(struct page *page)
++static void remap_page(struct page *page)
+ {
+ int i;
+ if (PageTransHuge(page)) {
+@@ -2300,7 +2300,7 @@ static void __split_huge_page(struct pag
+
+ spin_unlock_irqrestore(zone_lru_lock(page_zone(head)), flags);
+
+- unfreeze_page(head);
++ remap_page(head);
+
+ for (i = 0; i < HPAGE_PMD_NR; i++) {
+ struct page *subpage = head + i;
+@@ -2466,7 +2466,7 @@ int split_huge_page_to_list(struct page
+ }
+
+ /*
+- * Racy check if we can split the page, before freeze_page() will
++ * Racy check if we can split the page, before unmap_page() will
+ * split PMDs
+ */
+ if (total_mapcount(head) != page_count(head) - extra_pins - 1) {
+@@ -2475,7 +2475,7 @@ int split_huge_page_to_list(struct page
+ }
+
+ mlocked = PageMlocked(page);
+- freeze_page(head);
++ unmap_page(head);
+ VM_BUG_ON_PAGE(compound_mapcount(head), head);
+
+ /* Make sure the page is not on per-CPU pagevec as it takes pin */
+@@ -2527,7 +2527,7 @@ int split_huge_page_to_list(struct page
+ fail: if (mapping)
+ spin_unlock(&mapping->tree_lock);
+ spin_unlock_irqrestore(zone_lru_lock(page_zone(head)), flags);
+- unfreeze_page(head);
++ remap_page(head);
+ ret = -EBUSY;
+ }
+
diff --git a/series.conf b/series.conf
index 2b7e9b2029..71894aa6c9 100644
--- a/series.conf
+++ b/series.conf
@@ -19363,6 +19363,7 @@
patches.fixes/userfaultfd-shmem-hugetlbfs-only-allow-to-register-vm_maywrite-vmas.patch
patches.fixes/userfaultfd-shmem-add-i_size-checks.patch
patches.fixes/userfaultfd-shmem-uffdio_copy-set-the-page-dirty-if-vm_write-is-not-set.patch
+ patches.fixes/mm-huge_memory-rename-freeze_page-to-unmap_page.patch
patches.drivers/pci-imx6-fix-link-training-status-detection-in-link-up-check
patches.fixes/fs-fix-lost-error-code-in-dio_complete.patch
patches.fixes/nvme-free-ctrl-device-name-on-init-failure.patch