lkml.org 
[lkml]   [2006]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [discuss] mmap, mbind and write to mmap'ed memory crashes 2.6.16-rc1[2] on 2 node X86_64
On Wed, 8 Feb 2006, Andi Kleen wrote:

> On Wednesday 08 February 2006 16:42, Christoph Lameter wrote:
>
> > However, this has implications for policy_zone. This variable should store
> > the zone that policies apply to. However, in your case this zone will vary
> > which may lead to all sorts of weird behavior even if we fix
> > bind_zonelist. To which zone does policy apply? ZONE_NORMAL or ZONE_DMA32?
>
> It really needs to apply to both (currently you can't police 4GB of your
> memory on x86-64) But I haven't worked out a good design how to implement it yet.

So a provisional solution would be to simply ignore empty zones in
bind_zonelist? Or fall back to earlier zones (which includes unpolicied
zones in the bind zone list?)

Index: linux-2.6.16-rc2/mm/mempolicy.c
===================================================================
--- linux-2.6.16-rc2.orig/mm/mempolicy.c 2006-02-02 22:03:08.000000000 -0800
+++ linux-2.6.16-rc2/mm/mempolicy.c 2006-02-08 07:55:29.000000000 -0800
@@ -143,8 +143,12 @@ static struct zonelist *bind_zonelist(no
if (!zl)
return NULL;
num = 0;
- for_each_node_mask(nd, *nodes)
- zl->zones[num++] = &NODE_DATA(nd)->node_zones[policy_zone];
+ for_each_node_mask(nd, *nodes) {
+ struct zone *zone = &NODE_DATA(nd)->node_zones[policy_zone];
+
+ if (zone->present_pages)
+ zl->zones[num++] = &NODE_DATA(nd)->node_zones[policy_zone];
+ }
zl->zones[num] = NULL;
return zl;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-02-08 17:02    [W:0.271 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site