forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit1d91df8
mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs
memalloc_nocma_{save/restore} APIs can be used to skip page allocationon CMA area, but, there is a missing case and the page on CMA area couldbe allocated even if APIs are used. This patch handles this case to fixthe potential issue.For now, these APIs are used to prevent long-term pinning on the CMApage. When the long-term pinning is requested on the CMA page, it ismigrated to the non-CMA page before pinning. This non-CMA page isallocated by using memalloc_nocma_{save/restore} APIs. If APIs doesn'twork as intended, the CMA page is allocated and it is pinned for a longtime. This long-term pin for the CMA page causes cma_alloc() failureand it could result in wrong behaviour on the device driver who uses thecma_alloc().Missing case is an allocation from the pcplist. MIGRATE_MOVABLE pcplistcould have the pages on CMA area so we need to skip it if ALLOC_CMAisn't specified.Fixes:8510e69 (mm/page_alloc: fix memalloc_nocma_{save/restore} APIs)Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Acked-by: Vlastimil Babka <vbabka@suse.cz>Acked-by: Michal Hocko <mhocko@suse.com>Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>Cc: Mel Gorman <mgorman@techsingularity.net>Link:https://lkml.kernel.org/r/1601429472-12599-1-git-send-email-iamjoonsoo.kim@lge.comSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent484cfac commit1d91df8
1 file changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3367 | 3367 | | |
3368 | 3368 | | |
3369 | 3369 | | |
3370 | | - | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
3371 | 3377 | | |
3372 | | - | |
| 3378 | + | |
| 3379 | + | |
3373 | 3380 | | |
3374 | 3381 | | |
3375 | 3382 | | |
| |||
3381 | 3388 | | |
3382 | 3389 | | |
3383 | 3390 | | |
3384 | | - | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
3385 | 3398 | | |
3386 | 3399 | | |
3387 | 3400 | | |
| |||
0 commit comments
Comments
(0)