@@ -1604,25 +1604,6 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec,
1604
1604
1605
1605
}
1606
1606
1607
- #ifdef CONFIG_CMA
1608
- /*
1609
- * It is waste of effort to scan and reclaim CMA pages if it is not available
1610
- * for current allocation context. Kswapd can not be enrolled as it can not
1611
- * distinguish this scenario by using sc->gfp_mask = GFP_KERNEL
1612
- */
1613
- static bool skip_cma (struct folio * folio , struct scan_control * sc )
1614
- {
1615
- return !current_is_kswapd () &&
1616
- gfp_migratetype (sc -> gfp_mask ) != MIGRATE_MOVABLE &&
1617
- folio_migratetype (folio ) == MIGRATE_CMA ;
1618
- }
1619
- #else
1620
- static bool skip_cma (struct folio * folio , struct scan_control * sc )
1621
- {
1622
- return false;
1623
- }
1624
- #endif
1625
-
1626
1607
/*
1627
1608
* Isolating page from the lruvec to fill in @dst list by nr_to_scan times.
1628
1609
*
@@ -1669,8 +1650,7 @@ static unsigned long isolate_lru_folios(unsigned long nr_to_scan,
1669
1650
nr_pages = folio_nr_pages (folio );
1670
1651
total_scan += nr_pages ;
1671
1652
1672
- if (folio_zonenum (folio ) > sc -> reclaim_idx ||
1673
- skip_cma (folio , sc )) {
1653
+ if (folio_zonenum (folio ) > sc -> reclaim_idx ) {
1674
1654
nr_skipped [folio_zonenum (folio )] += nr_pages ;
1675
1655
move_to = & folios_skipped ;
1676
1656
goto move ;
@@ -4320,7 +4300,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
4320
4300
}
4321
4301
4322
4302
/* ineligible */
4323
- if (zone > sc -> reclaim_idx || skip_cma ( folio , sc ) ) {
4303
+ if (zone > sc -> reclaim_idx ) {
4324
4304
gen = folio_inc_gen (lruvec , folio , false);
4325
4305
list_move_tail (& folio -> lru , & lrugen -> folios [gen ][type ][zone ]);
4326
4306
return true;
0 commit comments