Skip to content

Commit aececef

Browse files
committed
mm: drop is_huge_zero_pud()
jira LE-3557 Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6 commit-author Peter Xu <[email protected]> commit ef713ec Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/ef713ec3.failed It constantly returns false since 2017. One assertion is added in 2019 but it should never have triggered, IOW it means what is checked should be asserted instead. If it didn't exist for 7 years maybe it's good idea to remove it and only add it when it comes. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Alex Williamson <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Gavin Shan <[email protected]> Cc: Gerald Schaefer <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Niklas Schnelle <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> (cherry picked from commit ef713ec) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # include/linux/huge_mm.h # mm/huge_memory.c
1 parent db3b4ca commit aececef

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
mm: drop is_huge_zero_pud()
2+
3+
jira LE-3557
4+
Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6
5+
commit-author Peter Xu <[email protected]>
6+
commit ef713ec3a566d3e5e011c5d6201eb661ebf94c1f
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/ef713ec3.failed
10+
11+
It constantly returns false since 2017. One assertion is added in 2019 but
12+
it should never have triggered, IOW it means what is checked should be
13+
asserted instead.
14+
15+
If it didn't exist for 7 years maybe it's good idea to remove it and only
16+
add it when it comes.
17+
18+
Link: https://lkml.kernel.org/r/[email protected]
19+
Signed-off-by: Peter Xu <[email protected]>
20+
Reviewed-by: Jason Gunthorpe <[email protected]>
21+
Acked-by: David Hildenbrand <[email protected]>
22+
Cc: Matthew Wilcox <[email protected]>
23+
Cc: Aneesh Kumar K.V <[email protected]>
24+
Cc: Alexander Gordeev <[email protected]>
25+
Cc: Alex Williamson <[email protected]>
26+
Cc: Borislav Petkov <[email protected]>
27+
Cc: Catalin Marinas <[email protected]>
28+
Cc: Christian Borntraeger <[email protected]>
29+
Cc: Dave Hansen <[email protected]>
30+
Cc: Gavin Shan <[email protected]>
31+
Cc: Gerald Schaefer <[email protected]>
32+
Cc: Heiko Carstens <[email protected]>
33+
Cc: Ingo Molnar <[email protected]>
34+
Cc: Niklas Schnelle <[email protected]>
35+
Cc: Paolo Bonzini <[email protected]>
36+
Cc: Ryan Roberts <[email protected]>
37+
Cc: Sean Christopherson <[email protected]>
38+
Cc: Sven Schnelle <[email protected]>
39+
Cc: Thomas Gleixner <[email protected]>
40+
Cc: Vasily Gorbik <[email protected]>
41+
Cc: Will Deacon <[email protected]>
42+
Cc: Zi Yan <[email protected]>
43+
Signed-off-by: Andrew Morton <[email protected]>
44+
(cherry picked from commit ef713ec3a566d3e5e011c5d6201eb661ebf94c1f)
45+
Signed-off-by: Jonathan Maple <[email protected]>
46+
47+
# Conflicts:
48+
# include/linux/huge_mm.h
49+
# mm/huge_memory.c
50+
diff --cc include/linux/huge_mm.h
51+
index fc789c0ac85b,ffca706bac81..000000000000
52+
--- a/include/linux/huge_mm.h
53+
+++ b/include/linux/huge_mm.h
54+
@@@ -256,13 -433,8 +256,18 @@@ static inline bool is_huge_zero_pmd(pmd
55+
return pmd_present(pmd) && READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd);
56+
}
57+
58+
++<<<<<<< HEAD
59+
+static inline bool is_huge_zero_pud(pud_t pud)
60+
+{
61+
+ return false;
62+
+}
63+
+
64+
+struct page *mm_get_huge_zero_page(struct mm_struct *mm);
65+
+void mm_put_huge_zero_page(struct mm_struct *mm);
66+
++=======
67+
+ struct folio *mm_get_huge_zero_folio(struct mm_struct *mm);
68+
+ void mm_put_huge_zero_folio(struct mm_struct *mm);
69+
++>>>>>>> ef713ec3a566 (mm: drop is_huge_zero_pud())
70+
71+
#define mk_huge_pmd(page, prot) pmd_mkhuge(mk_pmd(page, prot))
72+
73+
@@@ -379,12 -573,7 +384,16 @@@ static inline bool is_huge_zero_pmd(pmd
74+
return false;
75+
}
76+
77+
++<<<<<<< HEAD
78+
+static inline bool is_huge_zero_pud(pud_t pud)
79+
+{
80+
+ return false;
81+
+}
82+
+
83+
+static inline void mm_put_huge_zero_page(struct mm_struct *mm)
84+
++=======
85+
+ static inline void mm_put_huge_zero_folio(struct mm_struct *mm)
86+
++>>>>>>> ef713ec3a566 (mm: drop is_huge_zero_pud())
87+
{
88+
return;
89+
}
90+
diff --cc mm/huge_memory.c
91+
index 20d9b3971dc8,a4a14b81e013..000000000000
92+
--- a/mm/huge_memory.c
93+
+++ b/mm/huge_memory.c
94+
@@@ -1236,17 -1703,8 +1234,22 @@@ int copy_huge_pud(struct mm_struct *dst
95+
goto out_unlock;
96+
97+
/*
98+
++<<<<<<< HEAD
99+
+ * When page table lock is held, the huge zero pud should not be
100+
+ * under splitting since we don't split the page itself, only pud to
101+
+ * a page table.
102+
+ */
103+
+ if (is_huge_zero_pud(pud)) {
104+
+ /* No huge zero pud yet */
105+
+ }
106+
+
107+
+ /*
108+
+ * TODO: once we support anonymous pages, use page_try_dup_anon_rmap()
109+
+ * and split if duplicating fails.
110+
++=======
111+
+ * TODO: once we support anonymous pages, use
112+
+ * folio_try_dup_anon_rmap_*() and split if duplicating fails.
113+
++>>>>>>> ef713ec3a566 (mm: drop is_huge_zero_pud())
114+
*/
115+
pudp_set_wrprotect(src_mm, addr, src_pud);
116+
pud = pud_mkold(pud_wrprotect(pud));
117+
* Unmerged path include/linux/huge_mm.h
118+
* Unmerged path mm/huge_memory.c

0 commit comments

Comments
 (0)