summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneal <neal>2008-02-18 10:43:22 +0000
committerneal <neal>2008-02-18 10:43:22 +0000
commit198307aad9d5933d0b85fb1b97afde6d5c12bdb8 (patch)
tree1d9cb587f323cb9980b6ac8c20e56ac629fd0935
parentee31ed0a6c91293314f4d1759f0a1cd549b14bc3 (diff)
2008-02-18 Neal H. Walfield <neal@gnu.org>
* ager.c (ager_loop): Improve debugging output.
-rw-r--r--viengoos/ChangeLog4
-rw-r--r--viengoos/ager.c19
2 files changed, 16 insertions, 7 deletions
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog
index 1a0d713..08276f7 100644
--- a/viengoos/ChangeLog
+++ b/viengoos/ChangeLog
@@ -1,5 +1,9 @@
2008-02-18 Neal H. Walfield <neal@gnu.org>
+ * ager.c (ager_loop): Improve debugging output.
+
+2008-02-18 Neal H. Walfield <neal@gnu.org>
+
* pager.c (pager_collect): When looking for a victim activity, if
none are found, repeat the process giving the number of active
pages less weight. Fix asserts.
diff --git a/viengoos/ager.c b/viengoos/ager.c
index e8a1b42..c248519 100644
--- a/viengoos/ager.c
+++ b/viengoos/ager.c
@@ -101,7 +101,7 @@ ager_loop (l4_thread_id_t main_thread)
fpages[count] = l4_fpage ((l4_word_t) objects[count], PAGESIZE);
if (iterations == FREQ && desc->shared)
- /* we periodically unmap shared frames. See above for
+ /* We periodically unmap shared frames. See above for
details. */
{
fpages[count] = l4_fpage_add_rights (fpages[count],
@@ -134,7 +134,9 @@ ager_loop (l4_thread_id_t main_thread)
rather than unmap as we are also interested in whether we
have accessed the object--this occurs as we access some
objects, e.g., cappages, on behalf activities or we have
- flushed a page of data to disk.) */
+ flushed a page of data to disk.) This also means that
+ when we flush shared objects, they are unmapped from the
+ root task. Happily, sigma0 maps them back. */
l4_flush_fpages (count, fpages);
int i;
@@ -301,11 +303,14 @@ ager_loop (l4_thread_id_t main_thread)
doit (root_activity, memory_total);
- debug (1, "%d of %d (%d%%) free; "
- "since last interation: %d became inactive, %d active",
- zalloc_memory, memory_total,
- (zalloc_memory * 100) / memory_total,
- became_inactive, became_active);
+ do_debug (1)
+ {
+ int a = zalloc_memory + available_list_count (&available);
+ debug (0, "%d of %d (%d%%) free; "
+ "since last interation: %d became inactive, %d active",
+ a, memory_total, (a * 100) / memory_total,
+ became_inactive, became_active);
+ }
ss_mutex_unlock (&kernel_lock);