Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jul 2002 16:35:41 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        Peter Wemm <peter@wemm.org>
Cc:        Jake Burkholder <jake@locore.ca>, Alan Cox <alc@FreeBSD.org>, 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>
In-Reply-To: <20020707212707.BD3713808@overcee.wemm.org>
References:  <20020707211530.GZ11391@cs.rice.edu> <20020707212707.BD3713808@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020707213541.GA11391>