From b15d17d7d9b95e3e5ba2a800fea8bb81bcf43777 Mon Sep 17 00:00:00 2001 From: neal Date: Sat, 16 Feb 2008 14:15:36 +0000 Subject: 2008-02-16 Neal H. Walfield * 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. --- viengoos/object.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'viengoos/object.c') 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; } } -- cgit v1.2.3