From 68ed7a07912acd5b5e7ba8b239681413f482e145 Mon Sep 17 00:00:00 2001 From: neal Date: Mon, 23 Jun 2008 19:58:47 +0000 Subject: hurd/ 2008-06-23 Neal H. Walfield * activity.h (struct activity_stats): New fields available_local, pending_eviction and discarded. viengoos/ 2008-06-23 Neal H. Walfield * memory.c (memory_frame_allocate): If we discard a page, update DESC->ACTIVITY's DISCARDED statistic. * pager.c (pager_collect): When we collect an activity, update its pressure statistic. --- viengoos/ChangeLog | 8 ++++++++ viengoos/memory.c | 5 ++++- viengoos/pager.c | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'viengoos') diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog index 791061f..6e99205 100644 --- a/viengoos/ChangeLog +++ b/viengoos/ChangeLog @@ -1,3 +1,11 @@ +2008-06-23 Neal H. Walfield + + * memory.c (memory_frame_allocate): If we discard a page, update + DESC->ACTIVITY's DISCARDED statistic. + + * pager.c (pager_collect): When we collect an activity, update + its pressure statistic. + 2008-06-23 Neal H. Walfield * pager.c: Include "profile.h". diff --git a/viengoos/memory.c b/viengoos/memory.c index 257459b..1c9d60f 100644 --- a/viengoos/memory.c +++ b/viengoos/memory.c @@ -396,7 +396,10 @@ memory_frame_allocate (struct activity *activity) bool discarded = desc->dirty; if (discarded) - assert (desc->policy.discardable); + { + assert (desc->policy.discardable); + ACTIVITY_STATS (desc->activity)->discarded ++; + } oid_t oid = desc->oid; memory_object_destroy (activity, object); diff --git a/viengoos/pager.c b/viengoos/pager.c index a489dbe..0dd3f72 100644 --- a/viengoos/pager.c +++ b/viengoos/pager.c @@ -502,6 +502,9 @@ pager_collect (int goal) if (! victim) break; + + ACTIVITY_STATS (victim)->pressure += 4; + assert (victim); } while (victim != parent); -- cgit v1.2.3