forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commitd7fefcc
mm/cma: add PF flag to force non cma alloc
Patch series "mm/kvm/vfio/ppc64: Migrate compound pages out of CMAregion", v8.ppc64 uses the CMA area for the allocation of guest page table (hashpage table). We won't be able to start guest if we fail to allocatehash page table. We have observed hash table allocation failure becausewe failed to migrate pages out of CMA region because they were pinned.This happen when we are using VFIO. VFIO on ppc64 pins the entire guestRAM. If the guest RAM pages get allocated out of CMA region, we won'tbe able to migrate those pages. The pages are also pinned for thelifetime of the guest.Currently we support migration of non-compound pages. With THP and withthe addition of hugetlb migration we can end up allocating compoundpages from CMA region. This patch series add support for migratingcompound pages.This patch (of 4):Add PF_MEMALLOC_NOCMA which make sure any allocation in that context ismarked non-movable and hence cannot be satisfied by CMA region.This is useful with get_user_pages_longterm where we want to take a pagepin by migrating pages from CMA region. Marking the sectionPF_MEMALLOC_NOCMA ensures that we avoid unnecessary page migrationlater.Link:http://lkml.kernel.org/r/20190114095438.32470-2-aneesh.kumar@linux.ibm.comSigned-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>Suggested-by: Andrea Arcangeli <aarcange@redhat.com>Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>Cc: Michal Hocko <mhocko@kernel.org>Cc: Alexey Kardashevskiy <aik@ozlabs.ru>Cc: David Gibson <david@gibson.dropbear.id.au>Cc: Michael Ellerman <mpe@ellerman.id.au>Cc: Mel Gorman <mgorman@techsingularity.net>Cc: Vlastimil Babka <vbabka@suse.cz>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent6e2e07c commitd7fefcc
2 files changed
+41
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
| 1410 | + | |
1410 | 1411 | | |
1411 | 1412 | | |
1412 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
| |||
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
251 | 283 | | |
252 | 284 | | |
253 | 285 | | |
| |||
0 commit comments
Comments
(0)