DEFINE_MAX_SEQ(lruvec);
if (!current_is_kswapd()) {
- /* age each memcg once to ensure fairness */
+ /* age each memcg at most once to ensure fairness */
if (max_seq - seq > 1)
return true;
/*
* A minimum amount of work was done under global memory pressure. For
- * kswapd, it may be overshooting. For direct reclaim, the target isn't
- * met, and yet the allocation may still succeed, since kswapd may have
- * caught up. In either case, it's better to stop now, and restart if
- * necessary.
+ * kswapd, it may be overshooting. For direct reclaim, the allocation
+ * may succeed if all suitable zones are somewhat safe. In either case,
+ * it's better to stop now, and restart later if necessary.
*/
for (i = 0; i <= sc->reclaim_idx; i++) {
unsigned long wmark;