forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit56993b4
mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf()
There are many instances where vmemap allocation is often switched betweenregular memory and device memory just based on whether altmap is availableor not. vmemmap_alloc_block_buf() is used in various platforms toallocate vmemmap mappings. Lets also enable it to handle altmap baseddevice memory allocation along with existing regular memory allocations.This will help in avoiding the altmap based allocation switch in manyplaces. To summarize there are two different methods to callvmemmap_alloc_block_buf().vmemmap_alloc_block_buf(size, node, NULL) /* Allocate from system RAM */vmemmap_alloc_block_buf(size, node, altmap) /* Allocate from altmap */This converts altmap_alloc_block_buf() into a static function, drops it'sentry from the header and updates Documentation/vm/memory-model.rst.Suggested-by: Robin Murphy <robin.murphy@arm.com>Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Tested-by: Jia He <justin.he@arm.com>Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>Cc: Jonathan Corbet <corbet@lwn.net>Cc: Will Deacon <will@kernel.org>Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>Cc: Paul Mackerras <paulus@samba.org>Cc: Michael Ellerman <mpe@ellerman.id.au>Cc: Dave Hansen <dave.hansen@linux.intel.com>Cc: Andy Lutomirski <luto@kernel.org>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: Ingo Molnar <mingo@redhat.com>Cc: Borislav Petkov <bp@alien8.de>Cc: "H. Peter Anvin" <hpa@zytor.com>Cc: Dan Williams <dan.j.williams@intel.com>Cc: David Hildenbrand <david@redhat.com>Cc: Fenghua Yu <fenghua.yu@intel.com>Cc: Hsin-Yi Wang <hsinyi@chromium.org>Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>Cc: Mark Rutland <mark.rutland@arm.com>Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>Cc: Michal Hocko <mhocko@suse.com>Cc: Mike Rapoport <rppt@linux.ibm.com>Cc: Palmer Dabbelt <palmer@dabbelt.com>Cc: Paul Walmsley <paul.walmsley@sifive.com>Cc: Pavel Tatashin <pasha.tatashin@soleen.com>Cc: Steve Capper <steve.capper@arm.com>Cc: Tony Luck <tony.luck@intel.com>Cc: Yu Zhao <yuzhao@google.com>Link:http://lkml.kernel.org/r/1594004178-8861-3-git-send-email-anshuman.khandual@arm.comSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent1d9cfee commit56993b4
File tree
6 files changed
+20
-25
lines changed- Documentation/vm
- arch
- arm64/mm
- powerpc/mm
- x86/mm
- include/linux
- mm
6 files changed
+20
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
| 1518 | + | |
1522 | 1519 | | |
1523 | 1520 | | |
1524 | 1521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2982 | 2982 | | |
2983 | 2983 | | |
2984 | 2984 | | |
2985 | | - | |
2986 | | - | |
| 2985 | + | |
| 2986 | + | |
2987 | 2987 | | |
2988 | 2988 | | |
2989 | 2989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | | - | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
0 commit comments
Comments
(0)