diff options
-rw-r--r-- | benchmarks/ChangeLog | 6 | ||||
-rw-r--r-- | benchmarks/GCbench.c | 2 | ||||
-rw-r--r-- | benchmarks/activity-distribution.c | 2 | ||||
-rw-r--r-- | hurd/ChangeLog | 8 | ||||
-rw-r--r-- | hurd/cap.h | 20 | ||||
-rw-r--r-- | ruth/ChangeLog | 5 | ||||
-rw-r--r-- | ruth/ruth.c | 2 |
7 files changed, 31 insertions, 14 deletions
diff --git a/benchmarks/ChangeLog b/benchmarks/ChangeLog index 98f58f4..9c120db 100644 --- a/benchmarks/ChangeLog +++ b/benchmarks/ChangeLog @@ -1,3 +1,9 @@ +2008-11-04 Neal H. Walfield <neal@gnu.org> + + * activity-distribution.c (main): Use OBJECT_PRIORITY_DEFAULT, not + OBJECT_PRIORITY_LRU. + * GCbench.c (helper): Likewise. + 2008-06-27 Neal H. Walfield <neal@gnu.org> * shared-memory-distribution.c (main): Update to use activity_info diff --git a/benchmarks/GCbench.c b/benchmarks/GCbench.c index ab05665..1b786be 100644 --- a/benchmarks/GCbench.c +++ b/benchmarks/GCbench.c @@ -176,7 +176,7 @@ helper (void *arg) { pagers[c] = anonymous_pager_alloc (hog_activity, NULL, s, MAP_ACCESS_ALL, - OBJECT_POLICY (false, OBJECT_PRIORITY_LRU), 0, + OBJECT_POLICY (false, OBJECT_PRIORITY_DEFAULT), 0, NULL, &buffers[c]); assert (pagers[c]); assert (buffers[c]); diff --git a/benchmarks/activity-distribution.c b/benchmarks/activity-distribution.c index cffc288..966d8af 100644 --- a/benchmarks/activity-distribution.c +++ b/benchmarks/activity-distribution.c @@ -113,7 +113,7 @@ main (int argc, char *argv[]) pagers[i] = anonymous_pager_alloc (ADDR_VOID, NULL, SIZE, MAP_ACCESS_ALL, OBJECT_POLICY (true, - OBJECT_PRIORITY_LRU), + OBJECT_PRIORITY_DEFAULT), 0, my_fill, &buffers[i]); assert (pagers[i]); assert (buffers[i]); diff --git a/hurd/ChangeLog b/hurd/ChangeLog index ed94ead..86eac83 100644 --- a/hurd/ChangeLog +++ b/hurd/ChangeLog @@ -1,3 +1,11 @@ +2008-11-04 Neal H. Walfield <neal@gnu.org> + + * cap.h (OBJECT_PRIORITY_BITS): Change to 7. + (OBJECT_PRIORITY_LEVELS): Define. + (OBJECT_PRIORITY_LRU): Don't define. Update users. + (struct object_policy): Remove field pad0. Change to a uint8_t. + (OBJECT_POLICY): Update. + 2008-08-16 Neal H. Walfield <neal@gnu.org> * thread.h (thread_start_sp_ip): New function. @@ -170,11 +170,11 @@ cap_type_strengthen (enum cap_type type) /* Object policy. */ -/* The object priority is a signed 10-bit number. A lower numeric - value corresponds to a lower priority. */ -#define OBJECT_PRIORITY_BITS 10 +/* The object priority is a signed 7-bit number (-64 -> 63). A lower + numeric value corresponds to a lower priority. */ +#define OBJECT_PRIORITY_BITS 7 +#define OBJECT_PRIORITY_LEVELS (1 << OBJECT_PRIORITY_BITS) #define OBJECT_PRIORITY_MIN (-(1 << (OBJECT_PRIORITY_BITS - 1))) -#define OBJECT_PRIORITY_LRU (0) #define OBJECT_PRIORITY_DEFAULT (0) #define OBJECT_PRIORITY_MAX ((1 << (OBJECT_PRIORITY_BITS - 1)) - 1) @@ -184,29 +184,27 @@ struct object_policy { struct { - int16_t pad0 : 5; - /* Whether a page is discardable (if so and the page is not zero, trying to read the page from disk generates a first fault fault). */ - int16_t discardable : 1; + int8_t discardable : 1; /* An object's priority. If can be used to override LRU eviction. When a memory object is to be evicted, we select the object with the lowest priority (higher value = lower priority). */ - int16_t priority : OBJECT_PRIORITY_BITS; + int8_t priority : OBJECT_PRIORITY_BITS; }; - uint16_t raw; + uint8_t raw; }; }; #define OBJECT_POLICY_INIT { { raw: 0 } } #define OBJECT_POLICY(__op_discardable, __op_priority) \ - (struct object_policy) { { { 0, (__op_discardable), (__op_priority) } } } + (struct object_policy) { { { (__op_discardable), (__op_priority) } } } /* The default object policy: not discardable, managed by LRU. */ #define OBJECT_POLICY_VOID \ - OBJECT_POLICY (false, OBJECT_PRIORITY_LRU) + OBJECT_POLICY (false, OBJECT_PRIORITY_DEFAULT) /* Synonym for OBJECT_POLICY_VOID. */ #define OBJECT_POLICY_DEFAULT OBJECT_POLICY_VOID diff --git a/ruth/ChangeLog b/ruth/ChangeLog index 7adb897..0712359 100644 --- a/ruth/ChangeLog +++ b/ruth/ChangeLog @@ -1,3 +1,8 @@ +2008-11-04 Neal H. Walfield <neal@gnu.org> + + * ruth.c (main): Use OBJECT_PRIORITY_DEFAULT, not + OBJECT_PRIORITY_LRU. + 2008-08-15 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Allocate objects after setting up their diff --git a/ruth/ruth.c b/ruth/ruth.c index 30adc2a..f97bd1b 100644 --- a/ruth/ruth.c +++ b/ruth/ruth.c @@ -981,7 +981,7 @@ main (int argc, char *argv[]) void *addr; struct anonymous_pager *pager = anonymous_pager_alloc (ADDR_VOID, NULL, goal * PAGESIZE, MAP_ACCESS_ALL, - OBJECT_POLICY (true, OBJECT_PRIORITY_LRU), 0, + OBJECT_POLICY (true, OBJECT_PRIORITY_DEFAULT), 0, fill, &addr); assert (pager); |