aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2016-08-29 14:38:31 +0000
committerBruce Evans <bde@FreeBSD.org>2016-08-29 14:38:31 +0000
commitef209971e9aaeefde0d7caa90efcb5343aaf3fe0 (patch)
tree517cce25974dfd69b506302153899971f178fe72
parent1a5735873e4ca2b080c42536ac20058be63b4461 (diff)
Notes
-rw-r--r--sys/amd64/amd64/pmap.c21
-rw-r--r--sys/i386/i386/pmap.c24
2 files changed, 17 insertions, 28 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 3cb85301e93f9..104815908bc20 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -5153,8 +5153,7 @@ out:
}
/*
- * pmap_zero_page zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents.
+ * Zero the specified hardware page.
*/
void
pmap_zero_page(vm_page_t m)
@@ -5165,10 +5164,8 @@ pmap_zero_page(vm_page_t m)
}
/*
- * pmap_zero_page_area zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents.
- *
- * off and size may not cover an area beyond a single hardware page.
+ * Zero an an area within a single hardware page. off and size must not
+ * cover an area beyond a single hardware page.
*/
void
pmap_zero_page_area(vm_page_t m, int off, int size)
@@ -5182,10 +5179,9 @@ pmap_zero_page_area(vm_page_t m, int off, int size)
}
/*
- * pmap_zero_page_idle zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents. This
- * is intended to be called from the vm_pagezero process only and
- * outside of Giant.
+ * Zero the specified hardware page in a way that minimizes cache thrashing.
+ * This is intended to be called from the vm_pagezero process only and
+ * outside of Giant.
*/
void
pmap_zero_page_idle(vm_page_t m)
@@ -5196,10 +5192,7 @@ pmap_zero_page_idle(vm_page_t m)
}
/*
- * pmap_copy_page copies the specified (machine independent)
- * page by mapping the page into virtual memory and using
- * bcopy to copy the page, one machine dependent page at a
- * time.
+ * Copy 1 specified hardware page to another.
*/
void
pmap_copy_page(vm_page_t msrc, vm_page_t mdst)
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index d40de0ff8b103..d08c28babc008 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -4174,6 +4174,9 @@ out:
PMAP_UNLOCK(dst_pmap);
}
+/*
+ * Zero 1 page of virtual memory mapped from a hardware page by the caller.
+ */
static __inline void
pagezero(void *page)
{
@@ -4191,8 +4194,7 @@ pagezero(void *page)
}
/*
- * pmap_zero_page zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents.
+ * Zero the specified hardware page.
*/
void
pmap_zero_page(vm_page_t m)
@@ -4214,10 +4216,8 @@ pmap_zero_page(vm_page_t m)
}
/*
- * pmap_zero_page_area zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents.
- *
- * off and size may not cover an area beyond a single hardware page.
+ * Zero an an area within a single hardware page. off and size must not
+ * cover an area beyond a single hardware page.
*/
void
pmap_zero_page_area(vm_page_t m, int off, int size)
@@ -4242,10 +4242,9 @@ pmap_zero_page_area(vm_page_t m, int off, int size)
}
/*
- * pmap_zero_page_idle zeros the specified hardware page by mapping
- * the page into KVM and using bzero to clear its contents. This
- * is intended to be called from the vm_pagezero process only and
- * outside of Giant.
+ * Zero the specified hardware page in a way that minimizes cache thrashing.
+ * This is intended to be called from the vm_pagezero process only and
+ * outside of Giant.
*/
void
pmap_zero_page_idle(vm_page_t m)
@@ -4263,10 +4262,7 @@ pmap_zero_page_idle(vm_page_t m)
}
/*
- * pmap_copy_page copies the specified (machine independent)
- * page by mapping the page into virtual memory and using
- * bcopy to copy the page, one machine dependent page at a
- * time.
+ * Copy 1 specified hardware page to another.
*/
void
pmap_copy_page(vm_page_t src, vm_page_t dst)