Revert "BACKPORT: FROMGIT: mm: skip CMA pages when they are not available"
This reverts commit 0a52bf2972.
To be replaced with upstream version.
Bug: 288383787
Bug: 291719697
Change-Id: I2ff5d9cd8bb1e827cd5e233aa97325d026cec27f
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
22
mm/vmscan.c
22
mm/vmscan.c
@@ -1950,25 +1950,6 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec,
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
/*
|
||||
* It is waste of effort to scan and reclaim CMA pages if it is not available
|
||||
* for current allocation context. Kswapd can not be enrolled as it can not
|
||||
* distinguish this scenario by using sc->gfp_mask = GFP_KERNEL
|
||||
*/
|
||||
static bool skip_cma(struct page *page, struct scan_control *sc)
|
||||
{
|
||||
return !current_is_kswapd() &&
|
||||
gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
|
||||
get_pageblock_migratetype(page) == MIGRATE_CMA;
|
||||
}
|
||||
#else
|
||||
static bool skip_cma(struct page *page, struct scan_control *sc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Isolating page from the lruvec to fill in @dst list by nr_to_scan times.
|
||||
*
|
||||
@@ -2015,8 +1996,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
|
||||
nr_pages = compound_nr(page);
|
||||
total_scan += nr_pages;
|
||||
|
||||
if (page_zonenum(page) > sc->reclaim_idx ||
|
||||
skip_cma(page, sc)) {
|
||||
if (page_zonenum(page) > sc->reclaim_idx) {
|
||||
nr_skipped[page_zonenum(page)] += nr_pages;
|
||||
move_to = &pages_skipped;
|
||||
goto move;
|
||||
|
||||
Reference in New Issue
Block a user