summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-12-09 00:32:38 +0000
committeralc <alc@FreeBSD.org>2012-12-09 00:32:38 +0000
commit02094caa2c2fce94821d84bde50b9373b47f97e7 (patch)
treeaed54f82a0f3ede6ae38c3c71be27832f9a87d0a /sys/vm/vm_object.h
parentc82d89183db93c8a4a4a1db712fa5464d28ff9a3 (diff)
downloadFreeBSD-src-02094caa2c2fce94821d84bde50b9373b47f97e7.zip
FreeBSD-src-02094caa2c2fce94821d84bde50b9373b47f97e7.tar.gz
In the past four years, we've added two new vm object types. Each time,
similar changes had to be made in various places throughout the machine- independent virtual memory layer to support the new vm object type. However, in most of these places, it's actually not the type of the vm object that matters to us but instead certain attributes of its pages. For example, OBJT_DEVICE, OBJT_MGTDEVICE, and OBJT_SG objects contain fictitious pages. In other words, in most of these places, we were testing the vm object's type to determine if it contained fictitious (or unmanaged) pages. To both simplify the code in these places and make the addition of future vm object types easier, this change introduces two new vm object flags that describe attributes of the vm object's pages, specifically, whether they are fictitious or unmanaged. Reviewed and tested by: kib
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r--sys/vm/vm_object.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index daafd03..b584239 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -165,6 +165,8 @@ struct vm_object {
/*
* Flags
*/
+#define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */
+#define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */
#define OBJ_ACTIVE 0x0004 /* active objects */
#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */
#define OBJ_NOSPLIT 0x0010 /* dont split this object */
OpenPOWER on IntegriCloud