aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-03-03 06:27:25 -0500
committerSteve French <sfrench@us.ibm.com>2006-03-03 06:27:25 -0500
commitc6ee60b7c8bbc78e3b1776b2820a7e7f95f8996a (patch)
tree99b48ef0f5217fddc0aa897d9e60d95ace7da6ff /mm/vmscan.c
parent13298defe5323c7fdcac268f588d8d1090758fb8 (diff)
parentc499ec24c31edf270e777a868ffd0daddcfe7ebd (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1838c15ca4fd..b0af7593d01e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1908,7 +1908,12 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
1908 sc.swap_cluster_max = SWAP_CLUSTER_MAX; 1908 sc.swap_cluster_max = SWAP_CLUSTER_MAX;
1909 1909
1910 cond_resched(); 1910 cond_resched();
1911 p->flags |= PF_MEMALLOC; 1911 /*
1912 * We need to be able to allocate from the reserves for RECLAIM_SWAP
1913 * and we also need to be able to write out pages for RECLAIM_WRITE
1914 * and RECLAIM_SWAP.
1915 */
1916 p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
1912 reclaim_state.reclaimed_slab = 0; 1917 reclaim_state.reclaimed_slab = 0;
1913 p->reclaim_state = &reclaim_state; 1918 p->reclaim_state = &reclaim_state;
1914 1919
@@ -1932,11 +1937,10 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
1932 * a long time. 1937 * a long time.
1933 */ 1938 */
1934 shrink_slab(sc.nr_scanned, gfp_mask, order); 1939 shrink_slab(sc.nr_scanned, gfp_mask, order);
1935 sc.nr_reclaimed = 1; /* Avoid getting the off node timeout */
1936 } 1940 }
1937 1941
1938 p->reclaim_state = NULL; 1942 p->reclaim_state = NULL;
1939 current->flags &= ~PF_MEMALLOC; 1943 current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE);
1940 1944
1941 if (sc.nr_reclaimed == 0) 1945 if (sc.nr_reclaimed == 0)
1942 zone->last_unsuccessful_zone_reclaim = jiffies; 1946 zone->last_unsuccessful_zone_reclaim = jiffies;