Subject: Re: UBC problems
To: None <M.Drochner@fz-juelich.de>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-alpha
Date: 01/14/2005 22:59:59
This is a multipart MIME message.

--==_Exmh_14706832191360
Content-Type: text/plain; charset=us-ascii


just two comments:

-I can easily reproduce the problem with a simple patch to
 copyin() on i386, a patch which models the prefetch needed
 by architectures which don't like unaligned memory accesses.
 I'll append it. WARNING: it might cause data corruption.
 So I'd say this is not alpha specific; it is just a question
 of copyout() implementation. (btw, i386 might benefit from
 using an optimized memcpy() within copyin()/copyout())

-I now believe that the best way to deal with this would be to
 have UBC reads just return zero filled pages if the file is
 not backed with real data, and let upper layers (above the
 trap handler) check whether the read is legal. Just commenting
 out the range check in genfs_getpages() isn't enough,
 unfortunately. That's a pretty complex matter...

best regards
Matthias



--==_Exmh_14706832191360
Content-Type: text/plain ; name="dummyread.txt"; charset=us-ascii
Content-Description: dummyread.txt
Content-Disposition: attachment; filename="dummyread.txt"

--- locore.S.~1.31.~	Mon Aug 30 11:10:42 2004
+++ locore.S	Fri Jan 14 21:49:00 2005
@@ -1025,6 +1025,9 @@ ENTRY(i386_copyin)
 	cmpl	$VM_MAXUSER_ADDRESS,%edx
 	ja	_C_LABEL(copy_efault)
 
+	/* XXX noop, trigger ubc problem */
+	movb	(%edi),%cl
+
 	/* bcopy(%esi, %edi, %eax); */
 	cld
 	movl	%eax,%ecx

--==_Exmh_14706832191360--