From owner-cvs-all Sun Jul 7 15:33:41 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 B293537B422; Sun, 7 Jul 2002 15:33:28 -0700 (PDT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A93C43E42; Sun, 7 Jul 2002 15:33:28 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id B3C684A9B7; Sun, 7 Jul 2002 17:33:27 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id 3B92A4A9A8; Sun, 7 Jul 2002 17:33:27 -0500 (CDT) Date: Sun, 7 Jul 2002 17:33:27 -0500 From: Alan Cox To: Matthew Dillon Cc: Peter Wemm , Jake Burkholder , Alan Cox , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/vm vm_zeroidle.c Message-ID: <20020707223327.GB11391@cs.rice.edu> References: <20020707211530.GZ11391@cs.rice.edu> <20020707212707.BD3713808@overcee.wemm.org> <20020707213541.GA11391@cs.rice.edu> <200207072226.g67MQqoT017816@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207072226.g67MQqoT017816@apollo.backplane.com> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by AMaViS snapshot-20010714 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 On Sun, Jul 07, 2002 at 03:26:52PM -0700, Matthew Dillon wrote: > > :> 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. > : > :Let me suggest another way to deal with preemption: associate a flag > :with the pmap that says flush the TLB on activation even if you > :appear to be switching to the same page table, in this case the kernel's > :page table. pmap_zero_page() would set and unset this flag around > :the bzero(). > : > :Alan > > You mean CMAP2, not CMAP3, I think. > Peter's patch adds a CMAP3, which is essentially a private KVA for pmap_zero_page(). Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message