Memcgroups up against their limit were OOMing unjustifiably on x86_32
with highmem: pages ripe for freeing were not being found.
It's because the zonelist changes in vmscan.c now derive zone from gfp_mask,
and the gfp mask being passed into try_to_free_mem_cgroup_pages is atuned
to allocating a struct page_cgroup (__GFP_HIGHMEM masked off), whereas here
we need to be scanning highmem zones.
Frankenstein a gfp_mask from GFP_HIGHUSER_MOVABLE and the mask passed in.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
Same error was in -rc3-mm1, sorry for not sending fix in time for -rc5-mm1.
The error comes 1 or 4 patches earlier, but this patch atop 2.6.25-rc5-mm1
fits best just after
mm-have-zonelist-contains-structs-with-both-a-zone-pointer-and-zone_idx.patch
I've other GFP masking fixes or cleanups to come another day: this fixes
just one clear bug, peculiar to the -mm tree, orthogonal to the rest.
But two little do_try_to_free_pages cleanups follow on from this...
mm/vmscan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- 2.6.25-rc5-mm1/mm/vmscan.c 2008-03-11 14:19:36.000000000 +0000
+++ linux/mm/vmscan.c 2008-03-11 20:09:05.000000000 +0000
@@ -1444,7 +1444,6 @@ unsigned long try_to_free_mem_cgroup_pag
gfp_t gfp_mask)
{
struct scan_control sc = {
- .gfp_mask = gfp_mask,
.may_writepage = !laptop_mode,
.may_swap = 1,
.swap_cluster_max = SWAP_CLUSTER_MAX,
@@ -1454,9 +1453,10 @@ unsigned long try_to_free_mem_cgroup_pag
.isolate_pages = mem_cgroup_isolate_pages,
};
struct zonelist *zonelist;
- int target_zone = gfp_zonelist(GFP_HIGHUSER_MOVABLE);
- zonelist = &NODE_DATA(numa_node_id())->node_zonelists[target_zone];
+ sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) |
+ (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK);
+ zonelist = NODE_DATA(numa_node_id())->node_zonelists;
if (do_try_to_free_pages(zonelist, sc.gfp_mask, &sc))
return 1;
return 0;
--
| Jeff Chua | 2.6.27rc1 cannot boot more than 8CPUs |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Stephen Rothwell | Announce: Linux-next (Or Andrew's dream :-)) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Pedro Melo | Re: git on MacOSX and files with decomposed utf-8 file names |
| Matthieu Moy | git push to a non-bare repository |
| Pieter de Bie | [BUG] pull faulty 'not uptodate' |
| Leon Dippenaar | New tcp stack attack |
| Richard Stallman | Real men don't attack straw men |
| Pieter Verberne | pkg_add keeps giving errors |
| Will Maier | cron doesn't run commands in /etc/crontab? |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Daniele Lacamera | [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd |
| Rick Jones | Re: RFC: Nagle latency tuning |
