* request.
*/
static int
-shrink_caches(struct zone *classzone, int priority,
- int *total_scanned, int gfp_mask, const int nr_pages)
+shrink_caches(struct zone *classzone, int priority, int *total_scanned,
+ int gfp_mask, const int nr_pages, int order)
{
struct zone *first_classzone;
struct zone *zone;
int to_reclaim;
to_reclaim = zone->pages_high - zone->free_pages;
- if (to_reclaim < 0)
+ if (order == 0 && to_reclaim < 0)
continue; /* zone has enough memory */
to_reclaim = min(to_reclaim, SWAP_CLUSTER_MAX);
int total_scanned = 0;
nr_reclaimed += shrink_caches(classzone, priority,
- &total_scanned, gfp_mask, nr_pages);
+ &total_scanned, gfp_mask,
+ nr_pages, order);
if (nr_reclaimed >= nr_pages)
return 1;
if (total_scanned == 0)