From owner-cvs-all Sun Jul 7 14:35:48 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 1AAE237B400; Sun, 7 Jul 2002 14:35:43 -0700 (PDT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id B998143E52; Sun, 7 Jul 2002 14:35:42 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id 4554B4A9FE; Sun, 7 Jul 2002 16:35:42 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id 8DF954A9A8; Sun, 7 Jul 2002 16:35:41 -0500 (CDT) Date: Sun, 7 Jul 2002 16:35:41 -0500 From: Alan Cox To: Peter Wemm Cc: Jake Burkholder , Alan Cox , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_zeroidle.c Message-ID: <20020707213541.GA11391@cs.rice.edu> References: <20020707211530.GZ11391@cs.rice.edu> <20020707212707.BD3713808@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020707212707.BD3713808@overcee.wemm.org> 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 02:27:07PM -0700, Peter Wemm 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message