From owner-svn-src-all@freebsd.org Mon Aug 29 14:38:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D02DB78C3D; Mon, 29 Aug 2016 14:38:33 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AE17932; Mon, 29 Aug 2016 14:38:32 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7TEcW7f059874; Mon, 29 Aug 2016 14:38:32 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7TEcWr1059872; Mon, 29 Aug 2016 14:38:32 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201608291438.u7TEcWr1059872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Mon, 29 Aug 2016 14:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305005 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 14:38:33 -0000 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)