diff options
author | neal <neal> | 2008-06-27 15:17:27 +0000 |
---|---|---|
committer | neal <neal> | 2008-06-27 15:17:27 +0000 |
commit | c314b447a633a3aa2d1e4a882675038fd381e873 (patch) | |
tree | c3d2625fc63af15c7e6200203a5347e68f192713 /hieronymus/hieronymus.c | |
parent | 8305c7cd3d379fda42cee8c58783bf2ae52f4ff0 (diff) |
hurd/
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.
Diffstat (limited to 'hieronymus/hieronymus.c')
-rw-r--r-- | hieronymus/hieronymus.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/hieronymus/hieronymus.c b/hieronymus/hieronymus.c index 4fac2d5..a1ecfc0 100644 --- a/hieronymus/hieronymus.c +++ b/hieronymus/hieronymus.c @@ -111,8 +111,7 @@ do_gather_stats (void *arg) while (! all_done) { - int count; - struct activity_stats_buffer buffer; + struct activity_info info; if (size == stats_count) { @@ -134,8 +133,11 @@ do_gather_stats (void *arg) for (i = 0; i < module_count; i ++, stat ++) { error_t err; - err = rm_activity_stats (activities[0], - period, &buffer, &count); + err = rm_activity_info (activities[i], activity_info_stats, + period, &info); + assert_perror (err); + assert (info.event == activity_info_stats); + assert (info.stats.count > 0); if (err) { stat->alloced = 0; @@ -143,13 +145,14 @@ do_gather_stats (void *arg) } else { - stat->alloced = buffer.stats[0].clean + buffer.stats[0].dirty - + buffer.stats[0].pending_eviction; - stat->available = buffer.stats[0].available; + stat->alloced = info.stats.stats[0].clean + + info.stats.stats[0].dirty + + info.stats.stats[0].pending_eviction; + stat->available = info.stats.stats[0].available; if (n == 0) - n = buffer.stats[0].period + 1; + n = info.stats.stats[0].period + 1; } } @@ -208,21 +211,30 @@ main (int argc, char *argv[]) addr_t thread[module_count]; for (i = 0; i < module_count; i ++) { - int count; - struct activity_stats_buffer buffer; + /* Delay starting each process. */ +#if 0 + error_t err; + struct activity_info info; + err = rm_activity_info (activities[i], activity_info_stats, + i * 50, &info); + assert_perror (err); + assert (info.event == activity_info_stats); + assert (info.stats.count > 0); + const char *argv[] = { modules[i].name, modules[i].commandline, NULL }; const char *env[] = { NULL }; thread[i] = process_spawn (activities[i], modules[i].start, modules[i].end, argv, env, false); +#endif /* Free the memory used by the module's binary. */ /* XXX: This doesn't free folios or note pages that may be partially freed. The latter is important because a page may be used by two modules and after the second module is loaded, it could be freed. */ - count = 0; + int count = 0; int j; for (j = 0; j < __hurd_startup_data->desc_count; j ++) { |