Re: [PATCH] sgiwd93.c fix for multiple disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 10, 2001 at 09:07:57PM +0100, Florian Lohoff wrote:
> Hi,
> the attached patch fixes part of the DMA problems we see with multiple
> disks and the sgiwd93.c with DISCONNECTs. Klaus patch formerly just
> disabled all DMA replacing it with PIO which is a major performance hit.
> 
> This patch simply deletes all the HPC Scatter/Gather stuff thus we will
> see a couple more interrupts due to all segments beeing transferred
> individually. The transfer itself still happens with the HPC DMA thus
> the performance impact will not be that large. I am running a test right
> now but it seems the error is gone.

Ok - I am running the attached script right now which copies a kernel
source tree from one disk to another disk in a loop. I ran this on the a
133Mhz R4600 Indy with 2 SCSI Disks on the same SCSI bus.  Without the
patch not a single cycle in this script made it through as on page in
the binarys would be corrupted. Also a whole bunch of files of the source
tree would be broken, mangled truncated - Whatever might happen. Nothing
of this now happened while running the test for the last 5 hours. The
machine is still up and running and kind of responsive.

I am unsure if we should put this into CVS as it brings us correctness
for the price of some performance penalty.


#!/bin/sh

TMP=`tempfile`
MD5OUT=`tempfile`
LOG=/home/flo/break/log

SRC=/home/flo/break/
DST=/mnt/break/

[ ! -d $DST ] && mkdir $DST
[ ! -d $DST ] && exit 1

while [ 1 ]; do
	
	[ -d $DST/linux.bak ] && rm -rf $DST/linux.bak
	[ -d $DST/linux ] && mv $DST/linux $DST/linux.bak

	[ -d $DST/linux.bak.md5sum ] && rm -f $DST/linux.bak.md5sum
	[ -f $DST/linux.md5sum ] && mv $DST/linux.md5sum $DST/linux.bak.md5sum
	
	rm -f $TMP $MD5OUT

	printf "Starting copy %s - " "`date +\"%y-%m-%d %H:%M:%S\"`" >$TMP
	(cd $SRC ; tar -cf - linux* ) | ( cd /$DST ; tar -xf - ; sync )
	printf "Finished %s\n" "`date +\"%y-%m-%d %H:%M:%S\"`" >>$TMP


	printf "Checking md5sum %s - " "`date +\"%y-%m-%d %H:%M:%S\"`" >>$TMP

	md5sum -cv $DST/linux.md5sum >$MD5OUT 2>&1 

	totlines=`wc -l $MD5OUT | awk '{ print $1 }'`
	failedlines=`grep -v OK $MD5OUT | wc -l | awk '{ print $1 }'`

	printf "Finished %s\n" "`date +\"%y-%m-%d %H:%M:%S\"`" >>$TMP
	printf "%d files failed out of %d\n" $failedlines $totlines >>$TMP
	grep -v OK $MD5OUT >>$TMP

	cat $TMP >>$LOG
done



Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

PGP signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux