From owner-svn-src-user@FreeBSD.ORG Sat Jun 9 12:25:31 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D471106564A; Sat, 9 Jun 2012 12:25:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F05B8FC0A; Sat, 9 Jun 2012 12:25:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q59CPVOC032426; Sat, 9 Jun 2012 12:25:31 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q59CPVO3032423; Sat, 9 Jun 2012 12:25:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206091225.q59CPVO3032423@svn.freebsd.org> From: Attilio Rao Date: Sat, 9 Jun 2012 12:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236811 - user/attilio/vmc-playground/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 12:25:31 -0000 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?? */