/* Similar to reclaim, but different enough that they don't share logic */
static bool too_many_isolated(struct zone *zone)
{
+#ifdef CONFIG_AMLOGIC_CMA
+ signed long active, inactive, isolated;
+#else
unsigned long active, inactive, isolated;
+#endif
inactive = node_page_state(zone->zone_pgdat, NR_INACTIVE_FILE) +
node_page_state(zone->zone_pgdat, NR_INACTIVE_ANON);
isolated = node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE) +
node_page_state(zone->zone_pgdat, NR_ISOLATED_ANON);
+#ifdef CONFIG_AMLOGIC_CMA
+ isolated -= global_page_state(NR_CMA_ISOLATED);
+ WARN_ONCE(isolated > (inactive + active) / 2,
+ "isolated:%ld, cma:%ld, inactive:%ld, active:%ld\n",
+ isolated, global_page_state(NR_CMA_ISOLATED),
+ inactive, active);
+#endif /* CONFIG_AMLOGIC_CMA */
return isolated > (inactive + active) / 2;
}
#ifdef CONFIG_AMLOGIC_CMA