summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-19 20:01:22 +0000
committeralc <alc@FreeBSD.org>2002-12-19 20:01:22 +0000
commit5b0b01cd7cccd251ed7b3e5dfe30b7e8d5c4a1e6 (patch)
tree89b5c0cfbe1a90bac861fa611e00e5709ffed60a /sys/vm
parent081cb688bad1fc757639ad2826e4da11a0f994fe (diff)
downloadFreeBSD-src-5b0b01cd7cccd251ed7b3e5dfe30b7e8d5c4a1e6.zip
FreeBSD-src-5b0b01cd7cccd251ed7b3e5dfe30b7e8d5c4a1e6.tar.gz
Remove the hash_rand field from struct vm_object. As of revision 1.215 of
vm/vm_page.c, it is unused.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_object.c13
-rw-r--r--sys/vm/vm_object.h1
2 files changed, 1 insertions, 13 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 550b5d0..a6e0d51 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -190,8 +190,7 @@ vm_object_zinit(void *mem, int size)
void
_vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
{
- static int object_hash_rand;
- int exp, incr;
+ int incr;
TAILQ_INIT(&object->memq);
TAILQ_INIT(&object->shadow_head);
@@ -214,16 +213,6 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
object->handle = NULL;
object->backing_object = NULL;
object->backing_object_offset = (vm_ooffset_t) 0;
- /*
- * Try to generate a number that will spread objects out in the
- * hash table. We 'wipe' new objects across the hash in 128 page
- * increments plus 1 more to offset it a little more by the time
- * it wraps around.
- */
- do {
- exp = object_hash_rand;
- object->hash_rand = exp - 129;
- } while (!atomic_cmpset_int(&object_hash_rand, exp, object->hash_rand));
atomic_add_int(&object->generation, 1);
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index f1a5351..9f4e488 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -97,7 +97,6 @@ struct vm_object {
vm_pindex_t size; /* Object size */
int ref_count; /* How many refs?? */
int shadow_count; /* how many objects that this is a shadow for */
- int hash_rand; /* (c) hash table randomizer */
objtype_t type; /* type of pager */
u_short flags; /* see below */
u_short pg_color; /* (c) color of first page in obj */
OpenPOWER on IntegriCloud