From: Tomas Hruby Date: Fri, 18 Jun 2010 12:46:18 +0000 (+0000) Subject: Removed racy COW optimization X-Git-Tag: v3.1.8~441 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/soc.html?a=commitdiff_plain;h=8214e5e2846e10124bb9161a3db0904b7156c03e;p=minix.git Removed racy COW optimization - enabling writing in COW once phys block is reference only once is racy if VM is preemptible. original memory location may get overwritten before COW copies the memory - problem when DEBUG_RACE is on and a big problem for SMP --- diff --git a/servers/vm/region.c b/servers/vm/region.c index 9a9f18c0f..c9299d922 100644 --- a/servers/vm/region.c +++ b/servers/vm/region.c @@ -556,21 +556,6 @@ PUBLIC void pb_unreferenced(struct vir_region *region, struct phys_region *pr) panic("strange phys flags"); } SLABFREE(pb); - } else { - struct phys_region *others; - int n = 0; - - for(others = pb->firstregion; others; - others = others->next_ph_list) { - if(WRITABLE(region, others->ph)) { - if(map_ph_writept(others->parent->parent, - others->parent, others) != OK) { - printf("VM: map_ph_writept failed unexpectedly\n"); - } - } - n++; - } - assert(n == pb->refcount); } }