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
This commit is contained in:
Tomas Hruby 2010-06-18 12:46:18 +00:00
parent ad5771aa28
commit 8214e5e284

View file

@ -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);
}
}