From: dlg Date: Thu, 23 Apr 2015 09:56:23 +0000 (+0000) Subject: tedu remnants of the previous attempt to implement page zeroing in X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3e8e3ff2268fdafff702b42ba52029f5b4a3ee40;p=openbsd tedu remnants of the previous attempt to implement page zeroing in the idle thread. ok deraadt@ --- diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index 9496a4f2913..8b9d61c888d 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.57 2014/10/03 17:41:00 kettenis Exp $ */ +/* $OpenBSD: uvm.h,v 1.58 2015/04/23 09:56:23 dlg Exp $ */ /* $NetBSD: uvm.h,v 1.24 2000/11/27 08:40:02 chs Exp $ */ /* @@ -59,8 +59,6 @@ struct uvm { /* Lock order: pageqlock, then fpageqlock. */ struct mutex fpageqlock; /* lock for free page q + pdaemon */ boolean_t page_init_done; /* TRUE if uvm_page_init() finished */ - boolean_t page_idle_zero; /* TRUE if we should try to zero - pages in the idle loop */ struct uvm_pmr_control pmr_control; /* pmemrange data */ /* page daemon trigger */ diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index f6fa0d283e8..e7ceaf39c65 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.137 2015/03/14 03:38:53 jsg Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.138 2015/04/23 09:56:23 dlg Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -100,11 +100,6 @@ int vm_nphysseg = 0; /* XXXCDC: uvm.nphysseg */ * of the things necessary to do idle page zero'ing efficiently. * We therefore provide a way to disable it from machdep code here. */ -/* - * XXX disabled until we can find a way to do this without causing - * problems for either cpu caches or DMA latency. - */ -boolean_t vm_page_zero_enable = FALSE; /* * local variables @@ -154,7 +149,6 @@ uvm_pageinsert(struct vm_page *pg) static __inline void uvm_pageremove(struct vm_page *pg) { - KASSERT(pg->pg_flags & PG_TABLED); RB_REMOVE(uvm_objtree, &pg->uobject->memt, pg); @@ -289,9 +283,6 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr_t *kvm_endp) uvmexp.vnodemin = uvmexp.vnodeminpct * 256 / 100; uvmexp.vtextmin = uvmexp.vtextminpct * 256 / 100; - /* determine if we should zero pages in the idle loop. */ - uvm.page_idle_zero = vm_page_zero_enable; - uvm.page_init_done = TRUE; } @@ -1065,9 +1056,6 @@ uvm_pagefree(struct vm_page *pg) #endif uvm_pmr_freepages(pg, 1); - - if (uvmexp.zeropages < UVM_PAGEZERO_TARGET) - uvm.page_idle_zero = vm_page_zero_enable; } /*