From owner-cvs-all Sun Jul 7 14:27:15 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD97637B413; Sun, 7 Jul 2002 14:27:08 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C3D843E31; Sun, 7 Jul 2002 14:27:07 -0700 (PDT) (envelope-from peter@wemm.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id 041592A7E5; Sun, 7 Jul 2002 14:27:07 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id BDFC04C4E4; Sun, 7 Jul 2002 14:27:06 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id BD3713808; Sun, 7 Jul 2002 14:27:07 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Alan Cox Cc: Jake Burkholder , Alan Cox , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_zeroidle.c In-Reply-To: <20020707211530.GZ11391@cs.rice.edu> Date: Sun, 07 Jul 2002 14:27:07 -0700 From: Peter Wemm Message-Id: <20020707212707.BD3713808@overcee.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alan Cox wrote: > On Sun, Jul 07, 2002 at 04:11:06PM -0400, Jake Burkholder wrote: > > Apparently, On Sun, Jul 07, 2002 at 02:37:42PM -0500, > > Alan Cox said words to the effect of; > > > > > On Sun, Jul 07, 2002 at 12:27:57PM -0700, Alan Cox wrote: > > > > alc 2002/07/07 12:27:57 PDT > > > > > > > > Modified files: > > > > sys/vm vm_zeroidle.c > > > > Log: > > > > o Lock accesses to the free queue(s) in vm_page_zero_idle(). > > > > > > > > Revision Changes Path > > > > 1.10 +4 -0 src/sys/vm/vm_zeroidle.c > > > > > > I believe that Giant could be removed from vm_page_zero_idle() > > > on alpha and ia64. i386's pmap_zero_page() is not MPSAFE. > > > I'm not sure about sparc64. > > > > (re sparc64) > > > > The cache flush call is not MP-safe yet, because the IPI code isn't, > > but it won't take much to make it so. To do the zeroing it accesses > > physical addresses directly, similar to K0SEG addresses on alpha and > > RR7 addresses on ia64, which is MP-safe. > > We should really try to avoid generating IPI's from vm_page_zero_idle(). > > Perhaps a thread private KVA ... Thats what I did to avoid reentrancy problems. The zeroidle process uses CMAP3 on x86. (ugh! why not allocate some kvm? hmmm). However, with preemption, we can end up on another cpu. Or, we get scheduled on a different cpu next time. If we had a way to pin a khread to a particular cpu, now that would be nice. We could get in, pin ourselves, do our mappings, zero the page, unmap, unpin and done. No preemption problems to worry about then, and no need to worry about coherency on other cpus since this is explicitly single threaded. I believe John Baldwin has code to do this. Hmm.... Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message