summaryrefslogtreecommitdiff
path: root/viengoos/object.c
diff options
context:
space:
mode:
authorneal <neal>2008-06-23 19:43:20 +0000
committerneal <neal>2008-06-23 19:43:20 +0000
commit4efa44a9da99bbdd433bb162a612942eff90e78b (patch)
tree982556d7eb4b273bf6c3d3f2f95e1a9f97e88eec /viengoos/object.c
parent4a2e079910d11373f05213a753d360b2558ee7f2 (diff)
2008-06-23 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity): Add field frames_pending_eviction. Note that we now include frames that are in the laundry in the FRAMES_TOTAL and FRAMES_LOCAL variables. * object.c (object_desc_claim): If claiming a non-discardable eviction candidate, update ACTIVITY's FRAMES_LOCAL, and it and its ancestors' FRAMES_TOTAL and FRAMES_PENDING_EVICTION fields. * pager.c (reclaim_from): Update VICTIM->FRAMES_LOCAL, FRAMES_TOTAL and FRAMES_PENDING_EVICTION appropriately. (process): If ACTIVITY_FRAMES is less than GOAL / 1000, don't bother collecting the activity. (pager_collect): Loop at most 8 times. Increase the active factor by two. When calling process, don't include the frames pending eviction.
Diffstat (limited to 'viengoos/object.c')
-rw-r--r--viengoos/object.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/viengoos/object.c b/viengoos/object.c
index 80a8f25..bd90b7e 100644
--- a/viengoos/object.c
+++ b/viengoos/object.c
@@ -770,6 +770,21 @@ object_desc_claim (struct activity *activity, struct object_desc *desc,
{
laundry_list_unlink (&laundry, desc);
eviction_list_unlink (&desc->activity->eviction_dirty, desc);
+
+ if (update_accounting)
+ {
+ if (activity != desc->activity)
+ desc->activity->frames_local --;
+
+ struct activity *ancestor = desc->activity;
+ activity_for_each_ancestor
+ (ancestor,
+ ({
+ if (activity != desc->activity)
+ ancestor->frames_total --;
+ ancestor->frames_pending_eviction --;
+ }));
+ }
}
else
{