> Date: Sun, 27 Aug 2017 14:42:30 -0400 > From: Dale Rahn <dr...@dalerahn.com> > > Performance: use cache zeroing function to pmap_zero_page > > This improves page zeroing (a rather common occurance) by over 8x. > > The only restriction is that pagezero_cache occurs on cached pages, but the > pmap_zero_page always uses cached pages.
ok kettenis@ > Index: arm64/pmap.c > =================================================================== > RCS file: /cvs/src/sys/arch/arm64/arm64/pmap.c,v > retrieving revision 1.37 > diff -u -p -r1.37 pmap.c > --- arm64/pmap.c 9 Aug 2017 05:53:11 -0000 1.37 > +++ arm64/pmap.c 27 Aug 2017 18:25:28 -0000 > @@ -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); > } > Index: include/pmap.h > =================================================================== > RCS file: /cvs/src/sys/arch/arm64/include/pmap.h,v > retrieving revision 1.5 > diff -u -p -r1.5 pmap.h > --- include/pmap.h 10 May 2017 21:58:55 -0000 1.5 > +++ include/pmap.h 27 Aug 2017 18:25:28 -0000 > @@ -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 > */ > Dale Rahn dr...@dalerahn.com > >