diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-11-04 15:56:05 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-11-04 15:56:05 +0100 |
commit | b3c92f167f20f1267c6b4ec83f1b6b6edd2ba85a (patch) | |
tree | 97b731a8a48b4ba3252974e1350f5388da9172be /hurd | |
parent | 6a9f48779cf4037ff4a6ffe4c29d0bd13df0b66a (diff) |
Return the number of priority bits to 7.
hurd/
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.
ruth/
2008-11-04 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Use OBJECT_PRIORITY_DEFAULT, not
OBJECT_PRIORITY_LRU.
benchmarks/
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.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/ChangeLog | 8 | ||||
-rw-r--r-- | hurd/cap.h | 20 |
2 files changed, 17 insertions, 11 deletions
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 |