[PATCH] mm: free_pages_and_swap_cache opt
[deliverable/linux.git] / mm / swap_state.c
index 0df9a57b1de84bca534a9f6cc0c32d1ddefb939a..fc2aecb70a95c9e3559a2d4d1d4a2ae0700ebc50 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
 #include <linux/backing-dev.h>
+#include <linux/pagevec.h>
 
 #include <asm/pgtable.h>
 
@@ -272,12 +273,11 @@ void free_page_and_swap_cache(struct page *page)
  */
 void free_pages_and_swap_cache(struct page **pages, int nr)
 {
-       int chunk = 16;
        struct page **pagep = pages;
 
        lru_add_drain();
        while (nr) {
-               int todo = min(chunk, nr);
+               int todo = min(nr, PAGEVEC_SIZE);
                int i;
 
                for (i = 0; i < todo; i++)
This page took 0.024322 seconds and 5 git commands to generate.