summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-09-13 20:07:26 +0000
committeralc <alc@FreeBSD.org>2003-09-13 20:07:26 +0000
commitb182e8a6eb2eeed761202acafe91126d5d875c95 (patch)
tree19e296ecca528aab8b0bb41ad828cbc567349d55 /sys
parent297805438560bbccff99c9bf1c7676644f968c96 (diff)
downloadFreeBSD-src-b182e8a6eb2eeed761202acafe91126d5d875c95.zip
FreeBSD-src-b182e8a6eb2eeed761202acafe91126d5d875c95.tar.gz
There is no need for an atomic increment on the vm object's generation
count in _vm_object_allocate(). (Access to the generation count is governed by the vm object's lock.) Note: the introduction of the atomic increment in revision 1.238 appears to be an accident. The purpose of that commit was to fix an Alpha-specific bug in UMA's debugging code.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 6f48b94..fa3cf6f 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -198,6 +198,7 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
object->root = NULL;
object->type = type;
object->size = size;
+ object->generation = 1;
object->ref_count = 1;
object->flags = 0;
if ((object->type == OBJT_DEFAULT) || (object->type == OBJT_SWAP))
@@ -214,8 +215,6 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
object->backing_object = NULL;
object->backing_object_offset = (vm_ooffset_t) 0;
- atomic_add_int(&object->generation, 1);
-
mtx_lock(&vm_object_list_mtx);
TAILQ_INSERT_TAIL(&vm_object_list, object, object_list);
mtx_unlock(&vm_object_list_mtx);
OpenPOWER on IntegriCloud