Subject: Re: Request for UVM patch test
To: None <port-mips@netbsd.org, port-alpha@netbsd.org, port-m68k@netbsd.org,>
From: Ignatios Souvatzis <is@beverly.kleinbus.org>
List: port-alpha
Date: 05/20/2000 21:50:23
On Thu, May 18, 2000 at 10:47:30PM -0700, Jason R Thorpe wrote:
> I have a change to UVM that I need tested on a system that requires
> explicit I-cache frobbing, such as the MIPS or Alpha 21164 (I can't
> easily test this on a 21164 myself right now).
> 
> The deal here is that uvm_pagermapin() has been mapping pages with
> VM_PROT_EXECUTE, which causes an I-cache flush when the mapping is
> entered and when it is removed.  However, if the page needs execute
> permissions, those will be added when the page is mapped into the
> proper address space.
> 
> So, on the surface, this VM_PROT_EXECUTE in uvm_pagermapin() seems
> redundant.  But I would like to verify that that is the case.
> 
> To test this, you need a Very Up To Date sys/uvm (including uvm_pager.c
> rev 1.29).
> 
> Any takers?

works fine on Amiga/m68060. (Running right know, was up for several hours
without problems, did run all regression tests but sys/uvm/mmap, which was
broken before; did split (formail -s procmail) a 40 MB mbox file.

I've put m68k and arm32 on the list; they should be tested, too, AFAICT.

Index: uvm_pager.c
===================================================================
RCS file: /cvsroot/syssrc/sys/uvm/uvm_pager.c,v
retrieving revision 1.29
diff -c -r1.29 uvm_pager.c
*** uvm_pager.c	2000/05/19 03:45:04	1.29
--- uvm_pager.c	2000/05/19 05:40:28
***************
*** 180,198 ****
  		if ((pp->flags & PG_BUSY) == 0)
  			panic("uvm_pagermapin: page not busy");
  #endif
- 
- 		/*
- 		 * XXX We used to use VM_PROT_DEFAULT here, but
- 		 * XXX we don't since we know the direction of
- 		 * XXX the I/O now.  However, VM_PROT_DEFAULT
- 		 * XXX included VM_PROT_EXECUTE.  While that could
- 		 * XXX lead to unnecessary I-cache flushes, something
- 		 * XXX in the path might rely on that being done,
- 		 * XXX so we still include it, for now.
- 		 * XXX DOUBLE CHECK THIS!
- 		 */
  		pmap_enter(vm_map_pmap(pager_map), cva, VM_PAGE_TO_PHYS(pp),
! 		    prot | VM_PROT_EXECUTE, PMAP_WIRED | prot);
  	}
  
  	UVMHIST_LOG(maphist, "<- done (KVA=0x%x)", kva,0,0,0);
--- 180,187 ----
  		if ((pp->flags & PG_BUSY) == 0)
  			panic("uvm_pagermapin: page not busy");
  #endif
  		pmap_enter(vm_map_pmap(pager_map), cva, VM_PAGE_TO_PHYS(pp),
! 		    prot, PMAP_WIRED | prot);
  	}
  
  	UVMHIST_LOG(maphist, "<- done (KVA=0x%x)", kva,0,0,0);