From 8214e5e2846e10124bb9161a3db0904b7156c03e Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Fri, 18 Jun 2010 12:46:18 +0000 Subject: [PATCH] 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 --- servers/vm/region.c | 15 --------------- 1 file changed, 15 deletions(-) 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); } } -- 2.44.0