svn commit: r236811 - user/attilio/vmc-playground/sys/vm
Attilio Rao
attilio at FreeBSD.org
Sat Jun 9 12:25:31 UTC 2012
Author: attilio
Date: Sat Jun 9 12:25:30 2012
New Revision: 236811
URL: http://svn.freebsd.org/changeset/base/236811
Log:
Introduce a new tree for dealing with cached pages separately and
remove the RED/BLACK concept.
This is based on the assumption that path-compressed tries will be
small and fast enough that a separate trie for cached pages will make
sense and will leave the trie code simple enough (along with removing
a lot of differences in the userend code).
Modified:
user/attilio/vmc-playground/sys/vm/vm_object.c
user/attilio/vmc-playground/sys/vm/vm_object.h
Modified: user/attilio/vmc-playground/sys/vm/vm_object.c
==============================================================================
--- user/attilio/vmc-playground/sys/vm/vm_object.c Sat Jun 9 11:41:29 2012 (r236810)
+++ user/attilio/vmc-playground/sys/vm/vm_object.c Sat Jun 9 12:25:30 2012 (r236811)
@@ -211,6 +211,7 @@ _vm_object_allocate(objtype_t type, vm_p
LIST_INIT(&object->shadow_head);
object->rtree.rt_root = 0;
+ object->cache.rt_root = 0;
object->type = type;
object->size = size;
object->generation = 1;
@@ -773,6 +774,7 @@ vm_object_terminate(vm_object_t object)
break;
}
vm_radix_reclaim_allnodes(&object->rtree);
+ vm_radix_reclaim_allnodes(&object->cache);
/*
* If the object contained any pages, then reset it to an empty state.
* None of the object's fields, including "resident_page_count", were
Modified: user/attilio/vmc-playground/sys/vm/vm_object.h
==============================================================================
--- user/attilio/vmc-playground/sys/vm/vm_object.h Sat Jun 9 11:41:29 2012 (r236810)
+++ user/attilio/vmc-playground/sys/vm/vm_object.h Sat Jun 9 12:25:30 2012 (r236811)
@@ -90,6 +90,7 @@ struct vm_object {
LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */
TAILQ_HEAD(, vm_page) memq; /* list of resident pages */
struct vm_radix rtree; /* root of the resident page radix index tree */
+ struct vm_radix cache; /* root of the cache page radix index tree */
vm_pindex_t size; /* Object size */
int generation; /* generation ID */
int ref_count; /* How many refs?? */
More information about the svn-src-user
mailing list