mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
cma: fix watermark checking
* Add ALLOC_CMA alloc flag and pass it to [__]zone_watermark_ok() (from Minchan Kim). * During watermark check decrease available free pages number by free CMA pages number if necessary (unmovable allocations cannot use pages from CMA areas). Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Michal Nazarewicz <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d1ce749a0d
commit
d95ea5d18e
3 changed files with 36 additions and 17 deletions
|
|
@ -358,4 +358,18 @@ extern unsigned long vm_mmap_pgoff(struct file *, unsigned long,
|
|||
extern void set_pageblock_order(void);
|
||||
unsigned long reclaim_clean_pages_from_list(struct zone *zone,
|
||||
struct list_head *page_list);
|
||||
/* The ALLOC_WMARK bits are used as an index to zone->watermark */
|
||||
#define ALLOC_WMARK_MIN WMARK_MIN
|
||||
#define ALLOC_WMARK_LOW WMARK_LOW
|
||||
#define ALLOC_WMARK_HIGH WMARK_HIGH
|
||||
#define ALLOC_NO_WATERMARKS 0x04 /* don't check watermarks at all */
|
||||
|
||||
/* Mask to get the watermark bits */
|
||||
#define ALLOC_WMARK_MASK (ALLOC_NO_WATERMARKS-1)
|
||||
|
||||
#define ALLOC_HARDER 0x10 /* try to alloc harder */
|
||||
#define ALLOC_HIGH 0x20 /* __GFP_HIGH set */
|
||||
#define ALLOC_CPUSET 0x40 /* check for correct cpuset */
|
||||
#define ALLOC_CMA 0x80 /* allow allocations from CMA areas */
|
||||
|
||||
#endif /* __MM_INTERNAL_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue