summaryrefslogtreecommitdiff
path: root/viengoos/object.c
diff options
context:
space:
mode:
authorneal <neal>2008-02-16 14:15:36 +0000
committerneal <neal>2008-02-16 14:15:36 +0000
commitb15d17d7d9b95e3e5ba2a800fea8bb81bcf43777 (patch)
tree779e89a7db7ecaf8abbb6194ccd10acf39a3d818 /viengoos/object.c
parente36e1d5f65c6bbd89a8b7d42ba8f5765f77b551a (diff)
2008-02-16 Neal H. Walfield <neal@gnu.org>
* object.h (struct object_desc): Add fields mapped, shared and floating. (object_desc_unmap): Only unmap a page if DESC->MAPPED is true. (object_desc_flush): Call object_desc_unmap rather than copying the code. * object.c (object_find_soft): If ODESC->FLOATING is true, claim the object. Set ODESC->FLOATING to false. (folio_object_alloc): After clearing the page, flush it and then ODESC->DIRTY to false. Set ODESC->SHARED to false. * ager.c (SAMPLES): Rename from this... (FREQ): ... to this. Update users. (ager_loop): Don't just flush the whole address space; every FREQ iterations, unmap shared objects, set DESC->MAPPED to false, and DESC->FLOATING to true. * server.c (server_loop): When mapping a page, record it.
Diffstat (limited to 'viengoos/object.c')
-rw-r--r--viengoos/object.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/viengoos/object.c b/viengoos/object.c
index 8a4697f..d1b393f 100644
--- a/viengoos/object.c
+++ b/viengoos/object.c
@@ -236,10 +236,14 @@ object_find_soft (struct activity *activity, oid_t oid,
return object;
}
- if (! odesc->activity || ! object_active (odesc))
- /* Either the object is unowned or it is inactive. Claim
- ownership. */
- object_desc_claim (activity, odesc, policy, true);
+ if ((! odesc->activity || ! object_active (odesc))
+ || (odesc->activity != activity && odesc->floating))
+ /* Either the object is unowned, it is inactive or it is floating
+ (owned byt looking for a new owner). Claim ownership. */
+ {
+ object_desc_claim (activity, odesc, policy, true);
+ odesc->floating = false;
+ }
return object;
}
@@ -578,10 +582,13 @@ folio_object_alloc (struct activity *activity,
cap_shootdown (activity, &cap);
memset ((void *) object, 0, PAGESIZE);
+ object_desc_flush (odesc);
+ odesc->dirty = false;
object_desc_claim (activity, odesc, policy, true);
odesc->type = type;
+ odesc->shared = false;
}
}