vmscan: count the number of times zone_reclaim() scans and fails
[sfrench/cifs-2.6.git] / mm / vmscan.c
index 16c82a868e2b293c2533335f5881412ffee404d8..3018ad75613375c409f6a99d2e2a105604833c81 100644 (file)
@@ -2519,6 +2519,9 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
        ret = __zone_reclaim(zone, gfp_mask, order);
        zone_clear_flag(zone, ZONE_RECLAIM_LOCKED);
 
        ret = __zone_reclaim(zone, gfp_mask, order);
        zone_clear_flag(zone, ZONE_RECLAIM_LOCKED);
 
+       if (!ret)
+               count_vm_event(PGSCAN_ZONE_RECLAIM_FAILED);
+
        return ret;
 }
 #endif
        return ret;
 }
 #endif