Age | Commit message (Collapse) | Author |
|
2008-05-24 Neal H. Walfield <neal@gnu.org>
* activity.h (activity_stats): Take additional parameter,
until_period.
viengoos/
2008-05-24 Neal H. Walfield <neal@gnu.org>
* thread.h (THREAD_WAIT_STATS): Define.
* server.c (server_loop): Update implementation of activity_stats
to handle the new parameter, until_period. If the current period
is less than UNTIL_PERIOD, queue the caller on PRINCIPAL and do
not reply.
* ager.c: Include "thread.h".
(ager_loop): When generating an activity's statistics, if a thread
is waiting for the statistic, send it reply.
ruth/
2008-05-24 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Update user of rm_activity_stats to be consistent
with new interface.
|
|
2008-05-23 Neal H. Walfield <neal@gnu.org>
* cap.h (RM_object_status): Define.
(object_dirty): Likewise.
(object_referenced): Likewise.
(object_status): New method.
* folio.h (struct folio): Add fields dirty and referenced.
(folio_object_referenced): New function.
(folio_object_referenced_set): Likewise.
(folio_object_dirty): Likewise.
(folio_object_dirty_set): Likewise.
viengoos/
2008-05-23 Neal H. Walfield <neal@gnu.org>
* rm.h (rm_method_id_string): Handle the case where ID is
RM_object_status.
* server.c (server_loop): Implement the object_status method.
* ager.c (ager_loop): Set DESC->USER_DIRTY and DESC->REFERENCED as
appropriate.
* object.c (folio_object_alloc): Clear ODESC->USER_REFERENCED and
ODESC->USER_DIRTY.
(folio_object_alloc): Clear the object's user referenced and user
dirty bits.
* object.h (struct object_desc): Add fields user_dirty and
user_referenced.
(object_desc_unmap): Update DESC->USER_DIRTY and
DESC->USER_REFERENCED appropriately.
(object_desc_flush): LIkewise.
|
|
* ager.c (ager_loop): Don't flush shared pages, only unmap them.
|
|
2008-05-21 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity_stats): Add field period.
viengoos/
2008-05-21 Neal H. Walfield <neal@gnu.org>
* ager.c (ager_loop): To see if we are at the start of a period,
check if ITERATIONS is a multiple of FREQ, not if it is zero.
Set each activity's statistic's period field properly. Always
increment iterations.
|
|
* activity.h (struct activity): Unify the inactive_dirty and
inactive_clean lists. Update users.
|
|
* ager.c (ager_loop): Improve debugging output.
|
|
* 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.
|
|
2008-02-16 Neal H. Walfield <neal@gnu.org>
* object.h (kernel_lock): New declaration. Replace current
locking scheme with this global lock variable.
(lru_lock): Remove variable.
(struct object_desc): Remove field lock.
* object.c (kernel_lock): New variable.
libc-parts/
2008-02-16 Neal H. Walfield <neal@gnu.org>
* process-spawn.c (process_spawn) [RM_INTERN]: Don't take
LRU_LOCK.
|
|
* ager.c (ager_loop): Calculate statistics.
|
|
* activity.h: Include "list.h".
(LIST_CLASS_TYPE): Declare a activity_children list.
(struct activity): Change children's type to a struct
activity_children_list. Replace sibling_next and sibling_prev
with sibling, a struct list_node.
(activity_for_each_inmemory_child): Remove macro.
* activity.c (children_list_insert_after): Remove function.
Replace uses with appropriate list function.
(children_list_detach): Likewise.
* pager.c (pager_collect): Replace use of
activity_for_each_inmemory_child with a list iterator.
* ager.c (ager_loop): Likewise.
|
|
2008-02-13 Neal H. Walfield <neal@gnu.org>
* activity.h (RM_activity_stats): New definition.
(ACTIVITY_STATS_PERIODS): Change to 2.
(struct activity_stats_buffer): New structure.
(activity_stats): New RPC.
viengoos/
2008-02-13 Neal H. Walfield <neal@gnu.org>
* server.c (server_loop): Implement activity_stats method.
* ager.c (ager_loop): Implement first pass at updating available
memory statistic.
|
|
2008-02-05 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity_stats): New structure.
viengoos/
2008-02-05 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity): Add fields current_period and
stats.
(ACTIVITY_STATS): New macro.
(ACTIVITY_STAT_UPDATE): Likewise.
* ager.c (ager_loop): Gather statistics.
* pager.c (pager_collect): Likewise.
|
|
* mutex.h: New file, copy ../hurd/mutex.h.
* ager.c: Include "mutex.h", not <hurd/mutex.h>.
* object.h: Likewise.
* t-environment.h: Likewise.
* viengoos.c: Likewise.
|
|
* object.h (object_age): Add parameter referenced. Update users.
Use text-book aging algorithm.
* ager.c (ager_loop): Use object_age to age objects.
* object.h (object_active): New function.
* object.c (object_find_soft): Use it to check whether an object
is active.
(object_desc_claim): Likewise.
* ager.c (ager_loop): Likewise.
|
|
* activity.h (struct activity): Add fields eviction_clean and
eviction_dirty. Improve comments.
(activity_charge): Change asserts to account for unsignedness.
* activity.c (activity_destroy): Move all objects owned by VICTIM
to its parent.
(activity_deprepare): Add additional asserts.
(do_activity_dump): Don't assert that ACTIVITY->FRAMES_LOCAL is
the sum of the items on ACTIVITY's LRU lists.
* object.h (struct object_desc): Add fields eviction_candidate,
live, laundry_node and available_node. Make priority_node a union
with activity_node, which replaces activity_lru. Remove field
global_lru.
(object_activity_lru): Rename this list class...
(activity_lru): ... to this. Update users.
(object_global_lru): Don't generate this list class.
(eviction): Generate new list class.
(available): Likewise.
(laundry): Likewise.
(global_active): Remove declaration.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Likewise.
(laundry): New declaration.
(available): Likewise.
(memory_object_destroy): Likewise.
(object_desc_disown_simple): Remove declaration.
(object_disown_simple): Remove function.
(object_desc_disown): Likewise.
(object_disown): Likewise.
(object_desc_claim): Take additional parameter update_accounting.
Update users.
(object_claim): Likewise.
(object_desc_unmap): New function.
(object_age): Likewise.
(objects_folio_offset): Likewise.
(objects_folio): Likewise.
(object_free): Implement in terms of the above two functions.
* object.c (global_active): Remove variable.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Likewise.
(laundry): New variable.
(available): Likewise.
(memory_object_alloc): Initialize ODESC to 0. Call
object_desc_claim to attach it to the relevant lists. Assert that
ODESC->LIVE is 0. Set ODESC->LIVE to 1.
(memory_object_destroy): Remove static qualifier. Require that
LRU_LOCK be held on entry. Update users. Use object_desc_claim
to disconnect DESC from any lists to which it is attached. Don't
call memory_frame_free, that is now the caller's responsibility.
Update users. Set DESC->LIVE to 0.
(folio_free): Don't disown the folio header.
(folio_object_alloc): Call memory_frame_free to really free the
memory.
(object_desc_disown_simple): Remove function.
(object_desc_disown_): Likewise.
(object_desc_claim): Take additional parameter update_accounting.
If true, update the relevant activities' accounting information.
Update connect and disconnect code. Only add an object to one of
the priority tree and the lru lists, but not both.
* viengoos.c (system_task_load): After allocating the
root activity, have the root activity claim it and FOLIO.
* ager.c: Include "zalloc.h".
(AGE_DELTA): Don't define.
(ager_loop): Rewrite to walk the object descriptors sequentially
rather than following a linked list. Update object list
connection and disconnection code.
* pager.h: New file.
* pager.c: Likewise.
* Makefile.am (viengoos_SOURCES): Add pager.h and pager.c.
* memory.h (struct activity): Add forward.
(memory_frame_allocate): Take additional parameter activity.
Return a uintptr_t instead of an l4_word_t. Update users.
* memory.c: Include "pager.h" and "activity.h".
(memory_grab): Always get base page sized pages.
(memory_frame_allocate): Take additional parameter activity.
Return a uintptr_t instead of an l4_word_t. If zalloc fails,
check AVAILABLE_LIST. If nothing is applicable, call
pager_collect and try again.
* t-environment.h (pager_collect): New function.
|
|
* list.h: New file.
* Makefile.am (viengoos_SOURCES): Add list.h.
(t_link_SOURCES): Remove object.h. Add list.h.
* object.h: Include "list.h".
(LINK_TEMPLATE): Move from here...
* list.h: ... to this new file. Generalize functionality. Add
count, head, prev, next and prev methods. Rename LINK_TEMPLATE to
LIST_CLASS. Update users.
* object.h (struct object_desc): Change activity_lru and
global_lru to struct list_node's.
(global_active): Change to a struct object_global_lru_list.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Change to a struct object_activity_lru_list.
* object.c (global_active): Change to a struct
object_global_lru_list.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Change to a struct object_activity_lru_list.
* activity.h (struct activity): Change active, inactive_clean and
inactive_dirty to struct object_activity_lru_list's.
|
|
* object.h (struct object_desc): Replace field activity_lru.prevp
with activity_lru.prev. Replace field global_lru.prevp with
global_lru.prev.
(LINK_TEMPLATE): Use circular lists. Replace the
object_field_link function with object_field_push and
object_field_queue. Require that the caller pass the head of the
list to unlink. Update users.
|
|
* object.h: Include <hurd/btree.h>. Don't include "activity.h".
(struct activity): Add forward.
(struct object_desc): Add field priority_node.
(priority_compare): New function.
(priorities): New btree class.
* activity.h: Include <hurd/btree.h>. Don't include "object.h".
(struct activity): Add field priorities.
* ager.c (ager_loop): Don't add discardable dirty objects to the
inactive dirty list.
* object.h (object_find): Take additional parameter policy.
Update callers.
(object_find_soft): Likewise.
(object_desc_disown_simple): Move implementation from here...
* object.c (object_desc_disown_simple): ... to here. Maintain
the activity's priority-ordered object list.
* object.h (object_desc_disown_): Move from here...
* object.c (object_desc_disown_): ... to here. Maintain the
activity's priority-ordered object list.
* object.h (object_desc_claim_): Move from here...
* object.c (object_desc_claim_): ... to here. Take additional
parameter policy. Save the policy in the object descriptor.
Maintain the activity's priority-ordered object list. Update
callers.
* object.h (object_claim_): Take additional parameter policy.
Pass it to object_desc_claim_. Update callers.
* object.c (memory_object_alloc): Take additional parameter
policy. Pass it to object_desc_claim. Update callers.
(object_find_soft): Likewise.
(object_find): Likewise.
|
|
* ager.c: Include "activity.h".
* as.c: Include "rm.h".
* cap.h: Don't include "rm.h".
* loader.c: Include "cap.h" and "thread.h".
* loader.h: Don't include "activity.h" or "thread.h".
(struct activity): Add forward declaration.
(struct thread): Likewise.
* thread.h: Don't include "cap.h".
* viengoos.c: Include <hurd/thread.h>.
* as.c (as_insert): Add assert.
* cap-lookup.c (lookup): Improve assert.
|
|
* ager.c (ager_loop): When checking for overflow, be careful to
correctly cast the results.
|
|
* object.h (lru_lock): New declaration.
(LINK_TEMPLATE): Assert that LRU_LOCK is held.
(object_desc_disown_simple): Likewise.
(object_disown_simple): Likewise.
(object_desc_disown): Likewise.
(object_disown): Likewise.
(object_desc_claim): Likewise.
(object_claim): Likewise.
* object.c (lru_lock): Define.
(memory_object_alloc): Lock LRU_LOCK when manipulating
the LRU lists.
(memory_object_destroy): Likewise.
(object_find_soft): Likewise.
(folio_free): Likewise.
(folio_object_alloc): Likewise.
* activity.c (activity_destroy): Lock LRU_LOCK when manipulating
the LRU lists.
(activity_destroy): Likewise.
(activity_dump): Likewise.
(activity_consistency_check_): Assert that LRU_LOCK is held.
* ager.c (ager_loop): Lock LRU_LOCK when manipulating the LRU
lists.
* Makefile.am (t_link_CPPFLAGS): Include
$(srcdir)/t-environment.h.
(t_link_SOURCES): Add output.h, output.c and output-stdio.c.
* t-environment.h: Move includes down.
(environment_kip) [! _L4_TEST_MAIN]: Don't define, only declare.
Remove static qualifier.
(environment_api_version) [! _L4_TEST_MAIN]: Likewise.
(environment_api_flags) [! _L4_TEST_MAIN]: Likewise.
(environment_kernel_id) [! _L4_TEST_MAIN]: Likewise.
(environment_utcb) [! _L4_TEST_MAIN]: Likewise.
(environment_utcb_address) [! _L4_TEST_MAIN]: Likewise.
(environment_init): Initialize
ENVIRONMENT_UTCB_ADDRESS[_L4_UTCB_MY_GLOBAL_ID] to a non-NULL
value.
* t-link.c: Include "t-environment.h".
(_L4_TEST_MAIN): Define.
(program_name): Don't define.
(lru_lock): Define.
(main): Rename from this...
(test): ... to this. Lock LRU_LOCK on entry and unlock on exit.
|
|
Add a page ager.
* viengoos.c: Include "zalloc.h" and "ager.h".
(ager_start): New function.
(main): Call ager_start.
* ager.h: New file.
* ager.c: Likewise.
* Makefile.am (viengoos_SOURCES): Add ager.h and ager.c.
* object.h: Include <hurd/mutex.h>.
(struct object_desc): Add field lock.
* object.c (memory_object_alloc): Initialize ODESC->LOCK.
|