mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mm: restore zone->all_unreclaimable to independence word
commit e815af95 ("change all_unreclaimable zone member to flags") changed
all_unreclaimable member to bit flag. But it had an undesireble side
effect. free_one_page() is one of most hot path in linux kernel and
increasing atomic ops in it can reduce kernel performance a bit.
Thus, this patch revert such commit partially. at least
all_unreclaimable shouldn't share memory word with other zone flags.
[[email protected]: fix patch interaction]
Signed-off-by: KOSAKI Motohiro <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Wu Fengguang <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Huang Shijie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fc91668eaf
commit
93e4a89a8c
4 changed files with 14 additions and 23 deletions
22
mm/vmscan.c
22
mm/vmscan.c
|
|
@ -1699,8 +1699,7 @@ static void shrink_zones(int priority, struct zonelist *zonelist,
|
|||
continue;
|
||||
note_zone_scanning_priority(zone, priority);
|
||||
|
||||
if (zone_is_all_unreclaimable(zone) &&
|
||||
priority != DEF_PRIORITY)
|
||||
if (zone->all_unreclaimable && priority != DEF_PRIORITY)
|
||||
continue; /* Let kswapd poll it */
|
||||
sc->all_unreclaimable = 0;
|
||||
} else {
|
||||
|
|
@ -1927,7 +1926,7 @@ static int sleeping_prematurely(pg_data_t *pgdat, int order, long remaining)
|
|||
if (!populated_zone(zone))
|
||||
continue;
|
||||
|
||||
if (zone_is_all_unreclaimable(zone))
|
||||
if (zone->all_unreclaimable)
|
||||
continue;
|
||||
|
||||
if (!zone_watermark_ok(zone, order, high_wmark_pages(zone),
|
||||
|
|
@ -2017,8 +2016,7 @@ loop_again:
|
|||
if (!populated_zone(zone))
|
||||
continue;
|
||||
|
||||
if (zone_is_all_unreclaimable(zone) &&
|
||||
priority != DEF_PRIORITY)
|
||||
if (zone->all_unreclaimable && priority != DEF_PRIORITY)
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
|
@ -2061,8 +2059,7 @@ loop_again:
|
|||
if (!populated_zone(zone))
|
||||
continue;
|
||||
|
||||
if (zone_is_all_unreclaimable(zone) &&
|
||||
priority != DEF_PRIORITY)
|
||||
if (zone->all_unreclaimable && priority != DEF_PRIORITY)
|
||||
continue;
|
||||
|
||||
temp_priority[i] = priority;
|
||||
|
|
@ -2089,12 +2086,11 @@ loop_again:
|
|||
lru_pages);
|
||||
sc.nr_reclaimed += reclaim_state->reclaimed_slab;
|
||||
total_scanned += sc.nr_scanned;
|
||||
if (zone_is_all_unreclaimable(zone))
|
||||
if (zone->all_unreclaimable)
|
||||
continue;
|
||||
if (nr_slab == 0 && zone->pages_scanned >=
|
||||
(zone_reclaimable_pages(zone) * 6))
|
||||
zone_set_flag(zone,
|
||||
ZONE_ALL_UNRECLAIMABLE);
|
||||
if (nr_slab == 0 &&
|
||||
zone->pages_scanned >= (zone_reclaimable_pages(zone) * 6))
|
||||
zone->all_unreclaimable = 1;
|
||||
/*
|
||||
* If we've done a decent amount of scanning and
|
||||
* the reclaim ratio is low, start doing writepage
|
||||
|
|
@ -2624,7 +2620,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
|||
zone_page_state(zone, NR_SLAB_RECLAIMABLE) <= zone->min_slab_pages)
|
||||
return ZONE_RECLAIM_FULL;
|
||||
|
||||
if (zone_is_all_unreclaimable(zone))
|
||||
if (zone->all_unreclaimable)
|
||||
return ZONE_RECLAIM_FULL;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue