ANDROID: mm: export zone_watermark_ok

Export zone_watermark_ok and its friends so that modules
can use it to determine if zone watermarks are ok in the system.

Bug: 140294230
Change-Id: I958961150cf0c6db318f3e0daf1543ced00a9aab
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
This commit is contained in:
Sudarshan Rajagopalan 2021-02-23 16:57:27 -08:00 committed by Suren Baghdasaryan
parent 3b672417ef
commit e909fe79d2
2 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,7 @@ struct zoneref *__next_zones_zonelist(struct zoneref *z,
return z;
}
EXPORT_SYMBOL_GPL(__next_zones_zonelist);
#ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
bool memmap_valid_within(unsigned long pfn,
@ -130,3 +131,4 @@ enum zone_type gfp_zone(gfp_t flags)
VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
return z;
}
EXPORT_SYMBOL_GPL(gfp_zone);

View File

@ -3729,6 +3729,7 @@ bool zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
return __zone_watermark_ok(z, order, mark, highest_zoneidx, alloc_flags,
zone_page_state(z, NR_FREE_PAGES));
}
EXPORT_SYMBOL_GPL(zone_watermark_ok);
static inline bool zone_watermark_fast(struct zone *z, unsigned int order,
unsigned long mark, int highest_zoneidx,
@ -3781,6 +3782,7 @@ bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
return __zone_watermark_ok(z, order, mark, highest_zoneidx, 0,
free_pages);
}
EXPORT_SYMBOL_GPL(zone_watermark_ok_safe);
#ifdef CONFIG_NUMA
static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)