From owner-cvs-all Fri Apr 12 15:54: 4 2002 Delivered-To: cvs-all@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id EF63937B400; Fri, 12 Apr 2002 15:53:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id 5AC5918F7; Fri, 12 Apr 2002 17:53:52 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id A231718F8; Fri, 12 Apr 2002 17:53:50 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id 8A4F318F7; Fri, 12 Apr 2002 17:53:50 -0500 (CDT) Date: Fri, 12 Apr 2002 17:53:50 -0500 (CDT) From: Alan Cox To: Jake Burkholder Cc: Thomas Moestl , , Subject: Re: cvs commit: src/sys/kern sys_pipe.c In-Reply-To: <20020412170842.B10110@locore.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Fri, 12 Apr 2002, Jake Burkholder wrote: > Apparently, On Fri, Apr 12, 2002 at 03:42:37PM -0500, > Alan Cox said words to the effect of; > > > > > > > On Fri, 12 Apr 2002, Thomas Moestl wrote: > > > > > tmm 2002/04/12 12:38:41 PDT > > > > > > Modified files: > > > sys/kern sys_pipe.c > > > Log: > > > Do not use pmap_kextract() to find out the physical address of a user > > > belong to a user virtual address; while this happens to work on some > > > architectures, it can't on sparc64, since user and kernel virtual > > > address spaces overlap there (the distinction between them is done via > > > separate address space identifiers). > > > > > > > Why not pmap_extract() on the map->pmap? pmap_extract() is the equivalent > > of pmap_kextract() for ordinary pmap's, i.e., not the kernel pmap. > > > > Alan > > Because the sparc64 pmap uses a hash table like structure for non-kernel > pmaps with fixed size buckets. If there are too many hash collisions a > mapping can be forced out causing a replacement and a soft fault on the > next access. Basically, pmap_extract is not guaranteed to work for ordinary > pmaps. > The previous line is a vm_fault_quick() that should trigger the soft fault so that pmap_extract() returns a useful value. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message