Date: Sat, 9 Jun 2012 12:25:31 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r236811 - user/attilio/vmc-playground/sys/vm Message-ID: <201206091225.q59CPVO3032423@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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?? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206091225.q59CPVO3032423>