|
@@ -1917,6 +1917,8 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
|
|
nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */
|
|
nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */
|
|
int zlc_active = 0; /* set if using zonelist_cache */
|
|
int zlc_active = 0; /* set if using zonelist_cache */
|
|
int did_zlc_setup = 0; /* just call zlc_setup() one time */
|
|
int did_zlc_setup = 0; /* just call zlc_setup() one time */
|
|
|
|
+ bool consider_zone_dirty = (alloc_flags & ALLOC_WMARK_LOW) &&
|
|
|
|
+ (gfp_mask & __GFP_WRITE);
|
|
|
|
|
|
classzone_idx = zone_idx(preferred_zone);
|
|
classzone_idx = zone_idx(preferred_zone);
|
|
zonelist_scan:
|
|
zonelist_scan:
|
|
@@ -1976,8 +1978,7 @@ zonelist_scan:
|
|
* will require awareness of zones in the
|
|
* will require awareness of zones in the
|
|
* dirty-throttling and the flusher threads.
|
|
* dirty-throttling and the flusher threads.
|
|
*/
|
|
*/
|
|
- if ((alloc_flags & ALLOC_WMARK_LOW) &&
|
|
|
|
- (gfp_mask & __GFP_WRITE) && !zone_dirty_ok(zone))
|
|
|
|
|
|
+ if (consider_zone_dirty && !zone_dirty_ok(zone))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
mark = zone->watermark[alloc_flags & ALLOC_WMARK_MASK];
|
|
mark = zone->watermark[alloc_flags & ALLOC_WMARK_MASK];
|