Skip to content

Commit

Permalink
mm, page_alloc: convert nr_fair_skipped to bool
Browse files Browse the repository at this point in the history
The number of zones skipped to a zone expiring its fair zone allocation
quota is irrelevant.  Convert to bool.

Signed-off-by: Mel Gorman <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
gormanm authored and torvalds committed May 20, 2016
1 parent c603844 commit fa379b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
struct zoneref *z;
struct page *page = NULL;
struct zone *zone;
int nr_fair_skipped = 0;
bool fair_skipped;
bool zonelist_rescan;

zonelist_scan:
Expand Down Expand Up @@ -2708,7 +2708,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
if (!zone_local(ac->preferred_zone, zone))
break;
if (test_bit(ZONE_FAIR_DEPLETED, &zone->flags)) {
nr_fair_skipped++;
fair_skipped = true;
continue;
}
}
Expand Down Expand Up @@ -2801,7 +2801,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
*/
if (alloc_flags & ALLOC_FAIR) {
alloc_flags &= ~ALLOC_FAIR;
if (nr_fair_skipped) {
if (fair_skipped) {
zonelist_rescan = true;
reset_alloc_batches(ac->preferred_zone);
}
Expand Down

0 comments on commit fa379b9

Please sign in to comment.