Module Name:    src
Committed By:   yamt
Date:           Tue Jan 24 02:11:33 UTC 2012

Modified Files:
        src/sys/uvm [yamt-pagecache]: uvm_page_status.c

Log Message:
comments


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/uvm/uvm_page_status.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_page_status.c
diff -u src/sys/uvm/uvm_page_status.c:1.1.2.6 src/sys/uvm/uvm_page_status.c:1.1.2.7
--- src/sys/uvm/uvm_page_status.c:1.1.2.6	Wed Jan 18 02:09:06 2012
+++ src/sys/uvm/uvm_page_status.c	Tue Jan 24 02:11:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page_status.c,v 1.1.2.6 2012/01/18 02:09:06 yamt Exp $	*/
+/*	$NetBSD: uvm_page_status.c,v 1.1.2.7 2012/01/24 02:11:33 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page_status.c,v 1.1.2.6 2012/01/18 02:09:06 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page_status.c,v 1.1.2.7 2012/01/24 02:11:33 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,6 +52,8 @@ __CTASSERT(UVM_PAGE_STATUS_CLEAN == PG_C
 /*
  * uvm_pagegetdirty: return the dirtiness status (one of UVM_PAGE_STATUS_
  * values) of the page.
+ *
+ * called with the owner locked.
  */
 
 unsigned int
@@ -82,6 +84,13 @@ stat_update(bool isanon, unsigned int ol
 /*
  * uvm_pagemarkdirty: set the dirtiness status (one of UVM_PAGE_STATUS_ values)
  * of the page.
+ *
+ * called with the owner locked.
+ *
+ * update the radix tree tag for object-owned page.
+ *
+ * if new status is UVM_PAGE_STATUS_UNKNOWN, clear pmap-level dirty bit
+ * so that later uvm_pagecheckdirty() can notice modifications on the page.
  */
 
 void
@@ -133,6 +142,11 @@ uvm_pagemarkdirty(struct vm_page *pg, un
  * uvm_pagecheckdirty: check if page is dirty, and remove its dirty-marks.
  *
  * called with the owner locked.
+ *
+ * returns if the page was dirty.
+ *
+ * if protected is true, mark the page CLEAN.  otherwise, mark the page UNKNOWN.
+ * ("mark" in the sense of uvm_pagemarkdirty().)
  */
 
 bool
@@ -181,6 +195,12 @@ uvm_pagecheckdirty(struct vm_page *pg, b
 	return modified;
 }
 
+/*
+ * uvm_cpu_get: get a pointer to the uvm per-cpu area.
+ *
+ * XXX this should not be here.
+ */
+
 struct uvm_cpu *
 uvm_cpu_get(void)
 {
@@ -189,6 +209,12 @@ uvm_cpu_get(void)
 	return curcpu()->ci_data.cpu_uvm;
 }
 
+/*
+ * uvm_cpu_put: put a pointer to the uvm per-cpu area.
+ *
+ * XXX this should not be here.
+ */
+
 void
 uvm_cpu_put(struct uvm_cpu *ucpu)
 {

Reply via email to