Age | Commit message (Collapse) | Author |
|
2008-12-18 Neal H. Walfield <neal@gnu.org>
* viengoos/activity.h (struct activity_memory_policy): Rename from
this...
(struct vg_activity_memory_policy): ... to this. Update users.
(struct activity_policy): Rename from this...
(struct vg_activity_policy): ... to this. Update users.
(ACTIVITY_STATS_PERIODS): Rename from this...
(VG_ACTIVITY_STATS_PERIODS): ... to this. Update users.
(struct activity_stats): Rename from this...
(struct vg_activity_stats): ... to this. Update users.
(struct activity_info): Rename from this...
(struct vg_activity_info): ... to this. Update users.
* viengoos/addr.h (struct addr): Rename from this...
(struct vg_addr): ... to this. Update users.
* viengoos/cap.h (struct object_policy): Rename from this...
(struct vg_object_policy): ... to this. Update users.
(struct object_name): Rename from this...
(struct vg_object_name): ... to this. Update users.
(struct object): Rename from this...
(struct vg_object): ... to this. Update users.
* viengoos/folio.h (struct folio_policy): Rename from this...
(struct vg_folio_policy): ... to this. Update users.
(struct folio): Rename for this...
(struct vg_folio): ... to this. Update users.
* viengoos/thread.h
(HURD_EXREGS_SET_UTCB): Rename from this...
(VG_EXREGS_SET_UTCB): ... to this. Update users.
(HURD_EXREGS_SET_EXCEPTION_MESSENGER): Rename from this...
(VG_EXREGS_SET_EXCEPTION_MESSENGER): ... to this. Update users.
(HURD_EXREGS_SET_ASPACE): Rename from this...
(VG_EXREGS_SET_ASPACE): ... to this. Update users.
(HURD_EXREGS_SET_ACTIVITY): Rename from this...
(VG_EXREGS_SET_ACTIVITY): ... to this. Update users.
(HURD_EXREGS_SET_SP): Rename from this...
(VG_EXREGS_SET_SP): ... to this. Update users.
(HURD_EXREGS_SET_IP): Rename from this...
(VG_EXREGS_SET_IP): ... to this. Update users.
(HURD_EXREGS_SET_SP_IP): Rename from this...
(VG_EXREGS_SET_SP_IP): ... to this. Update users.
(HURD_EXREGS_SET_EFLAGS): Rename from this...
(VG_EXREGS_SET_EFLAGS): ... to this. Update users.
(HURD_EXREGS_SET_USER_HANDLE): Rename from this...
(VG_EXREGS_SET_USER_HANDLE): ... to this. Update users.
(HURD_EXREGS_SET_REGS): Rename from this...
(VG_EXREGS_SET_REGS): ... to this. Update users.
(HURD_EXREGS_GET_REGS): Rename from this...
(VG_EXREGS_GET_REGS): ... to this. Update users.
(HURD_EXREGS_START): Rename from this...
(VG_EXREGS_START): ... to this. Update users.
(HURD_EXREGS_STOP): Rename from this...
(VG_EXREGS_STOP): ... to this. Update users.
(HURD_EXREGS_ABORT_SEND): Rename from this...
(VG_EXREGS_ABORT_SEND): ... to this. Update users.
(HURD_EXREGS_ABORT_RECEIVE): Rename from this...
(VG_EXREGS_ABORT_RECEIVE): ... to this. Update users.
(HURD_EXREGS_ABORT_IPC): Rename from this...
(VG_EXREGS_ABORT_IPC): ... to this. Update users.
(struct hurd_thread_exregs_in): Rename form this...
(struct vg_thread_exregs_in): ... to this. Update users.
(struct hurd_thread_exregs_out): Rename form this...
(struct vg_thread_exregs_out): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg_activation. Update users.
(RPC_ID_PREFIX): Define to VG_ACTIVATION. Update users.
(ACTIVATION_fault): Rename from this...
(VG_ACTIVATION_fault): ... to this. Update users.
|
|
2008-12-17 Neal H. Walfield <neal@gnu.org>
* viengoos/activity.h: Add a "vg_" to public viengoos identifiers.
Update users.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/thread.h: Likewise.
|
|
/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* libviengoos: New directory.
* Makefile.am (SUBDIRS): Add libviengoos.
* configure.ac: Include libviengoos/headers.m4. Generate
libviengoos/Makefile.
hurd/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* activity.h: Move to ../libviengoos/viengoos. Update references.
* addr-trans.h: Likewise.
* addr.h: Likewise.
* cap.h: Likewise.
* folio.h: Likewise.
* futex.h: Likewise.
* ipc.h: Likewise.
* message.h: Likewise.
* messenger.h: Likewise.
* rpc.h: Likewise.
* thread.h: Move viengoos specific bits...
* ../libviengoos/viengoos/thread.h: ... to this new file.
* thread.h (struct hurd_utcb): New structure.
* exceptions.h (hurd_utcb): Use a struct hurd_utcb *, not a
struct vg_utcb *. Update users.
(hurd_activation_state_alloc): Likewise.
(hurd_activation_state_free): Likewise.
(hurd_activation_handler_activated): Likewise.
(hurd_activation_handler_normal): Likewise.
* t-addr-trans.c: Move to ../libviengoos.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* Makefile.am (TESTS, check_PROGRAMS, t_addr_CPPFLAGS)
(t_addr_SOURCES, t_addr_trans_CPPFLAGS, t_addr_trans_SOURCES)
(t_rpc_CPPFLAGS, t_rpc_SOURCES): Move from this file...
* ../libviengoos/Makefile.am.
* Makefile.am (includehurd_HEADERS): Don't mention activity.h,
addr-trans.h, addr.h, cap.h, folio.h, futex.h, ipc.h, message.h or
messenger.h.
* headers.m4: Don't create a link to hurd/addr.h,
hurd/addr-trans.h, hurd/cap.h, hurd/folio.h, hurd/rpc.h,
hurd/activity.h, hurd/futex.h, hurd/message.h, hurd/messenger.h or
hurd/ipc.h.
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* Makefile.am: New file.
* headers.m4: Likewise.
* t-addr-trans.c: Move from ../hurd.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* viengoos.h: Likewise.
* viengoos/activity.h: Likewise.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/ipc.h: Likewise.
* viengoos/message.h: Likewise.
* viengoos/messenger.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/misc.h: Moved from ../viengoos/rm.h.
* viengoos/thread.h: New file split from ../hurd/thread.h.
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* Makefile.am: New file.
* headers.m4: Likewise.
* t-addr-trans.c: Move from ../hurd.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* viengoos.h: Likewise.
* viengoos/activity.h: Likewise.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/ipc.h: Likewise.
* viengoos/message.h: Likewise.
* viengoos/messenger.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/misc.h: Moved from ../viengoos/rm.h.
* viengoos/thread.h: New file split from ../hurd/thread.h.
viengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* rm.h: Move from here...
* ../libviengoos/viengoos/misc.h: ... to here. Update users.
* headers.m4: Don't link rm.h to hurd/rm.h.
* Makefile.am (viengoos_SOURCES): Remove rm.h.
|
|
2008-11-04 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity): Replace fields active, inactive,
priorities and priorities_count with fields frames_ and frames.
Update users.
* object.h (activity_lru): Rename from this...
(activity): ... to this. Update users.
* activity.c (activity_destroy): When moving frames claimed by a
child to its parent's lowest priority level, update each frame's
respective priority.
(activity_prepare) [! NDEBUG]: Initialize priority levels.
|
|
2008-06-27 Neal H. Walfield <neal@gnu.org>
* activity.h (RM_activity_stats): Don't define.
(RM_activity_info): Replace with this.
(struct activity_stats): Add field pressure_local. Make field
pressure an 8 bit integer.
(struct activity_stats_buffer): Remove structure.
(struct activity_info): Replace with this structure.
(activity_info_stats): Define.
(activity_info_pressure): Likewise.
(activity_stats): Remove method.
(activity_info): Replace with this.
viengoos/
2008-06-27 Neal H. Walfield <neal@gnu.org>
* activity.h (struct activity): Add fields free_bad_karma,
free_goal, free_allocations and free_initial_allocation.
* rm.h (rm_method_id_string): Replace RM_activity_stats handling
with RM_activity_info handling.
* thread.h (THREAD_WAIT_STATS): Remove.
(THREAD_WAIT_ACTIVITY_INFO): Replace with this.
(struct thread): Add field wait_reason_arg2.
* ager.c (update_stats): Account for local pressure when
calculating availability. Don't use activity_stats to inform
threads of new statistics but activity_info.
* object.c (object_desc_claim): Adjust the activity's FREE_GOAL,
FREE_ALLOCATIONS, and FRAMES_EXCLUDED fields as appropriate.
* pager.c (pager_collect): When selecting a victim, don't include
an activity's excluded frames in its allocation. Don't even
consider activities for which FREE_ALLOCATIONS is non-zero.
Having selected a victim, don't increase the pressure do
drastically. Update the local pressure. Having selected a victim
from which to revoke pages, send any waiting threads a message to
free memory. If VICTIM->FREE_BAD_KARMA is 0, assume that the
memory will be freed and give the activity 100 claims to do it.
If the activity has bad karma, decrease it by one.
* server.c (server_loop): Replace activity_stats implementation
with implementation appropriate for activity_info.
hieronymus/
2008-06-27 Neal H. Walfield <neal@gnu.org>
* hieronymus.c (do_gather_stats): Change to use activity_info
instead of activity_stats.
(main): Introduce code to delay process creation.
ruth/
2008-06-27 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Update to use activity_info instead of
activity_stats.
benchmarks/
2008-06-27 Neal H. Walfield <neal@gnu.org>
* shared-memory-distribution.c (main): Update to use activity_info
instead of activity_status.
* activity-distribution.c (main): Likewise.
* GCbench.c: Include <stdint.h> and <stdbool.h>.
(now): New function.
(struct stats): Add fields time, gcs and iter.
(have_a_hog): New variable.
(mem_hog) [__gnu_hurd_viengoos__]: Rename from this...
(helper) [__gnu_hurd_viengoos__]: ... to this. Use activity_info,
not activity_stats. Gather more data.
(helper) [! __gnu_hurd_viengoos__]: New function.
(tid): Rename from this...
(helper_tid): ... to this.
(helper_fork) [__gnu_hurd_viengoos__]: Name activities.
(main): Improve output.
benchmarks/boehm-gc/
2008-06-27 Neal H. Walfield <neal@gnu.org>
* patches/05-viengoos-scheduler.patch: Update to use activity_info
in place of activity_stats. Listen for pressure messages and act
appropriately. Tighten adaptive code. Improve profiling code.
|
|
2008-06-26 Neal H. Walfield <neal@gnu.org>
* cap.h (RM_object_name): Define.
(struct object_name): New struct.
(object_name): New method.
viengoos/
2008-06-26 Neal H. Walfield <neal@gnu.org>
* rm.h (rm_method_id_string): Handle the RM_object_name case.
* server.c (server_loop): Implement the object_name method.
* activity.h (struct activity): New field name.
* thread.h (struct thread): Likewise.
* object.h (OBJECT_NAME_FMT): New macro.
(OBJECT_NAME_PRINTF): Likewise.
* activity.c: Include "thread.h".
(do_activity_dump): Use OBJECT_NAME_FMT and OBJECT_NAME_PRINTF
rather than OID_FMT and OID_PRINTF.
(activity_dump): Only call do_activity_dump if debugging output is
enabled.
* pager.c: Include "thread.h".
(pager_collect): Use OBJECT_NAME_FMT and OBJECT_NAME_PRINTF rather
than OID_FMT and OID_PRINTF.
* ager.c (update_stats): Likewise.
|
|
* activity.h (activity_charge): Also update ACTIVITY's claimed and
disowned statistics, as appropriate.
|
|
* 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.
|
|
* activity.h (struct activity): Add field priorities_count.
* activity.c (activity_destroy): Update it.
* object.c (object_desc_claim): Likewise.
* pager.c (reclaim_from): Likewise.
|
|
* activity.h (struct activity): Unify the inactive_dirty and
inactive_clean lists. Update users.
|
|
* activity.h (ACTIVITY_STATS): Correctly bounds check
ACTIVITY->CURRENT_PERIOD.
(ACTIVITY_STATS_LAST): New macro.
* server.c (server_loop): Correctly copy the statistic buffers to
the output buffer.
|
|
* 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.
|
|
* activity.h (activity_for_each_inmemory_child): Add additional
asserts.
|
|
* activity.h (activity_policy_update): New declaration.
* activity.c (children_list_insert_after): New function.
(children_list_detach): Likewise.
(activity_prepare): Use the above to insert ACTIVITY onto its
parent's children list. Keep the list is priority sorted order.
(activity_deprepare): Likewise, but to remove ACTIVITY from its
parent's children list.
(activity_policy_update): New function.
* server.c (server_loop): Use activity_policy_update to update an
activity's policy.
|
|
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.
|
|
* 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.
|
|
2008-01-01 Neal H. Walfield <neal@gnu.org>
* activity.h (RM_activity_properties): Rename...
(RM_activity_policy): ... to this. Update users.
(struct activity_memory_policy): New structure.
(ACTIVITY_MEMORY_POLICY): New definition.
(ACTIVITY_MEMORY_POLICY_VOID): Likewise.
(struct activity_policy): New structure.
(ACTIVITY_POLICY): New definition.
(ACTIVITY_POLICY_VOID): Likewise.
(ACTIVITY_PROPERTIES_PRIORITY_SET): Rename...
(ACTIVITY_POLICY_SIBLING_REL_PRIORITY_SET): ... to this. Update
users.
(ACTIVITY_PROPERTIES_WEIGHT_SET): Rename...
(ACTIVITY_POLICY_SIBLING_REL_WEIGHT_SET): ... to this. Update
users.
(ACTIVITY_PROPERTIES_STORAGE_QUOTA_SET): Rename...
(ACTIVITY_POLICY_STORAGE_SET): ... to this. Update users.
(ACTIVITY_PROPERTIES_ALL_SET): Rename...
(ACTIVITY_POLICY_SIBLING_REL_SET): ... to this.
(ACTIVITY_POLICY_CHILD_REL_PRIORITY_SET): New definition.
(ACTIVITY_POLICY_CHILD_REL_WEIGHT_SET): Likewise.
(ACTIVITY_POLICY_CHILD_REL_SET): Likewise.
(activity_properties): Rename...
(activity_policy): ... to this. Accept a structure rather than
individual variables. Update callers.
viengoos/
2008-01-01 Neal H. Walfield <neal@gnu.org>
* activity.h: Don't include <l4.h>, <errno.h> or <hurd/btree.h>.
Include <hurd/activity.h>.
(struct activity): Remove fields priority, weight and
storage_quota. Replace with policy. Change folio_count to a
uint32_t. Update users.
* server.c (server_loop): Remove activity_properties
implementation. Add activity_policy implementation.
* rm.h (rm_method_id_string): Remove RM_activity_properties case.
Handle RM_activity_policy.
ruth/
2008-01-01 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Remove activity_properties test. Replace with
activity_policy test.
|
|
* activity.h (struct activity): Rename field parent to parent_cap.
Rename field children to children_cap. Rename field sibling_next
to sibling_next_cap. Rename field sibling_prev to
sibling_prev_cap. Rename field parent_ptr to parent. Add fields
children, sibling_next and sibling_prev. Rename field frames to
frames_total. Add field frames_local. Update users.
(activity_prepare): New declaration.
(activity_deprepare): Likewise.
(activity_charge): Update ACTIVITY->FRAMES_LOCAL.
(activity_for_each_inmemory_child): New define.
* activity.c (activity_create): Call activity_prepare.
(activity_destroy): Assert that VICTIM->FRAMES_LOCAL is 0. Call
activity_deprepare.
(activity_prepare): New function.
(activity_deprepare): Likewise.
(do_activity_dump): Assert that the total number of objects on the
active, dirty and clean lists matches ACTIVITY->FRAMES_LOCAL.
|
|
* 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.
|
|
* activity.h (activity_for_each_child): Improve comment.
(activity_consistency_check): Remove.
(activity_consistency_check_): Likewise.
* activity.c (activity_consistency_check_): Remove.
* object.c (memory_object_alloc): Remove call to
activity_consistency_check.
(object_find_soft): Likewise.
(folio_free): Likewise.
(folio_object_alloc): Likewise.
|
|
* 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.
|
|
* activity.h: Update comment.
* activity.c (activity_consistency_check_): Don't assert that
LRU_LOCK is held.
* object.h (object_disown_simple): Don't call
activity_consistency_check here.
(object_desc_disown_): Likewise.
(object_desc_claim_): Likewise.
(object_desc_claim_): Likewise.
* object.c (memory_object_alloc): Call activity_consistency_check.
(memory_object_destroy): Likewise.
(object_find_soft): Likewise.
(folio_free): Likewise.
(folio_object_alloc): Likewise.
|
|
2007-12-10 Neal H. Walfield <neal@gnu.org>
Properly account memory and folios.
* activity.h (struct activity): Remove field objects. New fields
parent_ptr, active, inactive_clean, inactive_dirty and dying.
(root_activity): New declaration.
(activity_create): Return void. Don't take priority, weight and
storage_quota arguments. Update callers.
(activity_for_each_ancestor): New macro.
(activity_charge): New function.
(activity_for_each_child): New macro.
(activity_dump): New declaration.
(activity_consistency_check_): Likewise.
(activity_consistency_check): New macro.
* activity.c (root_activity): Define.
(activity_create): Return void. Don't take priority, weight and
storage_quota arguments. Remove relevant functionality. Set
CHILD->PARENT_PTR appropriately. Be careful when bootstrapping.
(activity_destroy): Check that VICTIM->DYING is not set. If so,
panic. Otherwise, set it. When recursively destroying an
activity, call object_free, not activity_destroy, to clean up.
Abandon all own frames. Assert that VICTIM->FRAMES and
VICTIM_FOLIO_COUNT are 0. Set PARENT->CHILDREN to
VICTIM->SIBLING_NEXT if VICTIM is the head of the list.
(do_activity_dump): New function.
(activity_dump): New function.
(activity_consistency_check_): New function.
* object.h: Don't include "thread.h".
(struct object_desc): Remove field activity. Rename field alru to
activity_lru. Rename field GLRU to global_lru. New fields dirty,
age and activity.
(LINK_TEMPLATE): New macro. Use it.
(dirty): Remove declaration.
(clean): Likewise.
(global_active): New declaration.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Likewise.
(object_desc_disown_simple): New function.
(object_disown_simple): Likewise.
(object_desc_disown_): Likewise.
(object_disown_): Likewise.
(object_desc_disown): New macro.
(object_disown): Likewise.
(object_desc_claim_): New function.
(object_claim_): Likewise.
(object_desc_claim): New macro.
(object_claim): Likewise.
(folio_parent): Remove parameter principal. Update callers.
(object_free): Improve parentheses.
* object.c: Include "thread.h".
(global_active): Define.
(global_inactive_dirty): Likewise.
(global_inactive_clean): Likewise.
(disowned): Likewise.
(object_init): Add asserts.
(memory_object_setup): Rename from this...
(memory_object_alloc): ... to this. Take additional parameters,
the type, oid and version. Also set up the object's descriptor.
Update callers.
(memory_object_destroy): Add asserts. Remove object from the
various linked lists. If OBJECT is an activity, assert that there
are no frames allocated against it.
(object_find_soft): If OBJECT is not accounted or inactive, assign
to ACTIVITY.
(folio_reparent): Rename from this...
(folio_parent): ... to this. Remove the parameter PRINCIPAL. Use
ACTIVITY where PRINCIPAL was previous used. Add asserts.
Correctly add FOLIO to ACTIVITY's folio list.
(folio_alloc): Check if the activity's storage quota allows the
allocation of another folio. Account the allocation of the folio.
(folio_free): Add asserts. Correctly account the folio. Clear
FOLIO->NEXT and FOLIO->PREV. Disown FOLIO's frame.
(folio_object_alloc): Assign OBJECT to ACTIVITY. When creating an
activity, call activity_create.
* cap.h (cap_set): Take additional parameter, a struct activity *.
Pass it to cap copy.
* cap.c Include "thread.h".
(cap_set_object): Remove dead function.
(cap_to_object): Clear CAP->TYPE if object_find returns NULL.
(cap_shootdown): Asser that ACTIVITY is not NULL.
* viengoos.c (root_activity): Don't define here.
* t-as.c (root_activity): Remove static qualifier.
* t-link.c: New file.
* t-activity.c: New file.
* Makefile.am (TESTS): Add t-activity and t-link.
(t_activity_CPPFLAGS): New variable.
(t_activity_SOURCES): Likewise.
(t_activity_LDADD): Likewise.
(t_link_CPPFLAGS): Likewise.
(t_link_SOURCES): Likewise.
* rm.h (RM_as_dump): Define.
(rm_method_id_string): Remove case for RM_activity_create.
(as_dump): New method.
* server.c (server_loop): Add support for method as_dump. Remove
support for method activity_create.
hurd/
2007-12-10 Neal H. Walfield <neal@gnu.org>
* activity.h (RM_activity_create): Don't define.
(activity_create): Remove method.
ruth/
2007-12-10 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Don't call rm_activity_create.
|
|
2007-11-28 Neal H. Walfield <neal@gnu.org>
* Makefile.am (includehurd_HEADERS): Add activity.h.
* headers.m4: Create link from ../include/hurd/activity.h to
activity.h.
* activity.h: New file.
viengoos/
2007-11-28 Neal H. Walfield <neal@gnu.org>
* activity.h (activity_allocate): Rename from this...
(activity_create): ... to this. Remove arguments caller, folio,
indent, activity and control. Add argument child. Update users.
* activity.c (activity_allocate): Rename from this...
(activity_create): ... to this. Remove arguments caller, folio,
indent, activity and control. Add argument child. If CHILD is
live, destroy it first. Correctly add CHILD to PARENT's children
list.
* activity.h (activity_destroy): Remove argument cap. Update
callers.
* activity.c (activity_destroy): Remove argument cap. Correctly
destroy child activities and allocated folios. Correctly unlink
from parent.
* server.c (CAP_): Remove argument writablep. Add argument
require_writable. Fail if REQUIRE_WRITABLE is true, and the
object is not writable.
(OBJECT_): Likewise.
(CAP): Remove argument writablep. Add argument require_writable.
Update callers.
(OBJECT): Likewise.
(server_loop): Add support for the activity_create method.
* object.c (folio_free): Also update FOLIO->FOLIO_VERSION.
(folio_object_alloc): Check if the object is a
cap_activity_control, not a cap_activity.
(folio_reparent): Correctly link FOLIO to PARENT.
* t-as.c (test): Don't create a cap_activity object but a
cap_activity_control object.
* viengoos.c (system_task_load): Likewise.
* cap.c (cap_to_object): Use cap_types_compatible when asserting
that the capability's type and the object's type are identical.
* thread.c (thread_exregs): Use cap_types_compatible when checking
whether the thread has a valid activity object.
* rm.h: Include <hurd/activity.h>.
(rm_method_id_string): Handle the RM_activity_create case.
ruth/
2007-11-28 Neal H. Walfield <neal@gnu.org>
* ruth.c: Include <hurd/activity.h>.
(main): Add test for activity_create.
|
|
* viengoos/Makefile.am: New file based on ../wortel/Makefile.am.
* viengoos/headers.m4: New file.
* viengoos/config.m4: New file based on ../wortel/config.m4.
* viengoos/viengoos.h: New file.
* viengoos/viengoos.c: New file.
* viengoos/activity.h: Likewise.
* viengoos/activity.c: Likewise.
* viengoos/as.h: Likewise.
* viengoos/as.c: Likewise.
* viengoos/cap-lookup.c: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/cap.c: Likewise.
* viengoos/thread.h: New file.
* viengoos/thread.c: New file.
* viengoos/object.h: New file.
* viengoos/object.c: New file.
* viengoos/rm.h: New file.
* viengoos/server.c: New file.
* viengoos/server.h: New file.
* viengoos/zalloc.h: Copied from ../physmem.
* viengoos/zalloc.c: Copied from ../physmem.
Don't include "output.h".
Include <hurd/stddef.h>.
Change uses of min_page_size to PAGESIZE.
* viengoos/memory.h: New file.
* viengoos/memory.c: New file.
* viengoos/sigma0.c: Copy from ../wortel.
* viengoos/sigma0.h: Copy from ../wortel.
Don't include "shutdown.h".
Include <hurd/stddef.h>.
* viengoos/bits.h: Likewise.
* viengoos/panic.c: New file.
* viengoos/debug.c: Likewise.
* viengoos/debug.h: Likewise.
* viengoos/boot-modules.h: Likewise.
* viengoos/boot-modules.c: Likewise.
* viengoos/elf.h: Copied from ../wortel.
* viengoos/loader.c: New file based on ../wortel/loader.c.
* viengoos/loader.h: New file.
* viengoos/multiboot.h: Copied from Grub.
* viengoos/mmap.c: New file based on ../physmem/mmap.c.
* viengoos/malloc-wrap.c: New file based on ../physmem/malloc-wrap.c.
* viengoos/malloc.c: Version 2.8.3 of Doug Lea's malloc.c.
* viengoos/malloc.h: Version 2.8.3 of Doug Lea's malloc.h.
* viengoos/ia32-cmain.c: New file based on ../wortel/ia32-cmain.c.
* viengoos/ia32-crt0.S: Copied from ../wortel.
(STACK_SIZE): Use a 16 page stack.
* viengoos/ia32-output.c: Copied from ../wortel.
* viengoos/ia32-shutdown.c: Likewise.
* viengoos/output.h: New file based on ../wortel/output.h.
Include <stdarg.h>.
(cprintf): New definition.
(output_debug): Don't define.
(debug): Don't define.
* viengoos/output.c: New file based on ../wortel/output.c.
Don't include <stdlib.h>.
(vprintf): New function.
(printf): Implement in terms of vprintf.
* viengoos/output-none.c: Copied from ../wortel.
* viengoos/output-serial.c: Likewise.
* viengoos/output-stdio.c: New file.
* viengoos/output-vga.c: Copied from ../wortel.
* viengoos/shutdown.h: New file based on ../wortel/shutdown.h.
Don't include "output.h".
(panic): Don't define.
(shutdown): Rename from this...
(shutdown_machine): ... to this.
* viengoos/shutdown.c: New file based on ../wortel/shutdown.c.
(reset) [_L4_TEST_ENVIRONMENT]: Call abort.
(halt) [_L4_TEST_ENVIRONMENT]: Call abort.
(shutdown): Rename from this...
(shutdown_machine): ... to this.
* viengoos/t-environment.h: New file based on
../libl4/tests/environment.h.
Protect from multiple inclusion.
Include <hurd/stddef.h>.
Include <string.h>.
Include <l4/stubs.h>.
(program_name): New declaration.
(check_nr): Don't assume that val1 and val2 are _L4_word_t, use
typeof instead.
(main): Call output_init.
* viengoos/t-as.c: New file.
|