svn commit: r305005 - in head/sys: amd64/amd64 i386/i386
Bruce Evans
bde at FreeBSD.org
Mon Aug 29 14:38:33 UTC 2016
Author: bde
Date: Mon Aug 29 14:38:31 2016
New Revision: 305005
URL: https://svnweb.freebsd.org/changeset/base/305005
Log:
Shorten banal comments about zeroing and copying pages. Don't give
implementation details that last echoed the code 15-20 years ago.
But add a detail about pagezero() on i386. Switch from Mach style
to BSD style.
Modified:
head/sys/amd64/amd64/pmap.c
head/sys/i386/i386/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Mon Aug 29 13:07:21 2016 (r305004)
+++ head/sys/amd64/amd64/pmap.c Mon Aug 29 14:38:31 2016 (r305005)
@@ -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
}
/*
- * 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)
Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c Mon Aug 29 13:07:21 2016 (r305004)
+++ head/sys/i386/i386/pmap.c Mon Aug 29 14:38:31 2016 (r305005)
@@ -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
}
/*
- * 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)
More information about the svn-src-head
mailing list