diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2017-08-27 19:33:03 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2017-08-27 19:33:03 +0000 |
commit | 031e064483e57b6a3d1b34dba486c1516115d9cd (patch) | |
tree | e844ae8c1d463652a5e26d477769e09d768872f9 | |
parent | 8f321e91d15338362393d0cb9f34cf3c0e9774a7 (diff) |
arm64 performance: use cache zeroing function in pmap_zero_page()
This improves page zeroing (a rather common occurance) by over 8x.
ok kettenis@, phessler@, tom@
-rw-r--r-- | sys/arch/arm64/arm64/pmap.c | 5 | ||||
-rw-r--r-- | sys/arch/arm64/include/pmap.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c index ed16adf2f9d..067b1ea2a53 100644 --- a/sys/arch/arm64/arm64/pmap.c +++ b/sys/arch/arm64/arm64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.37 2017/08/09 05:53:11 jsg Exp $ */ +/* $OpenBSD: pmap.c,v 1.38 2017/08/27 19:33:02 drahn Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com> * @@ -769,8 +769,7 @@ pmap_zero_page(struct vm_page *pg) pmap_kenter_pa(zero_page, pa, PROT_READ|PROT_WRITE); - /* XXX use better zero operation? */ - bzero((void *)zero_page, PAGE_SIZE); + pagezero_cache(zero_page); pmap_kremove_pg(zero_page); } diff --git a/sys/arch/arm64/include/pmap.h b/sys/arch/arm64/include/pmap.h index c9ecc18b60e..96c1a264e82 100644 --- a/sys/arch/arm64/include/pmap.h +++ b/sys/arch/arm64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.5 2017/05/10 21:58:55 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.6 2017/08/27 19:33:02 drahn Exp $ */ /* * Copyright (c) 2008,2009,2014 Dale Rahn <drahn@dalerahn.com> * @@ -59,6 +59,8 @@ extern paddr_t zero_page; extern paddr_t copy_src_page; extern paddr_t copy_dst_page; +void pagezero_cache(vaddr_t); + /* * Pmap stuff */ |