linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* 2.4.x swim3 performance problem on PM4400 identified
@ 2003-03-28 15:40 Mikael Pettersson
  2003-03-28 15:49 ` Benjamin Herrenschmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mikael Pettersson @ 2003-03-28 15:40 UTC (permalink / raw)
  To: linuxppc-dev


With 2.4 kernels, writes to floppy are about a factor of 10 slower
on my PowerMac 4400 than they are with 2.2 kernels.

The cause for this is a poll-loop in swim3.c which doesn't exist
in the 2.2 version. The patch below reverts that change, and
restores floppy write performance to 2.2 levels. I've built many
boot floppies with this modified driver w/o any problems.

/Mikael

--- linux-2.4.21-pre6/drivers/block/swim3.c.~1~	Wed Aug  7 00:52:20 2002
+++ linux-2.4.21-pre6/drivers/block/swim3.c	Fri Mar 28 16:02:17 2003
@@ -679,10 +679,14 @@
 			break;
 		dr = fs->dma;
 		cp = fs->dma_cmd;
+#if 0	/* This causes massive performance problems for my PM4400. /Mikael */
 		/* We must wait a bit for dbdma to complete */
 		for (n=0; (in_le32(&dr->status) & ACTIVE) && n < 1000; n++)
 			udelay(10);
 		DBDMA_DO_STOP(dr);
+#else	/* This is from 2.2 and it works much better for my PM4400. /Mikael */
+		st_le32(&dr->control, RUN << 16);
+#endif
 		out_8(&sw->intr_enable, 0);
 		out_8(&sw->control_bic, WRITE_SECTORS | DO_ACTION);
 		out_8(&sw->select, RELAX);

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-04-14 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-28 15:40 2.4.x swim3 performance problem on PM4400 identified Mikael Pettersson
2003-03-28 15:49 ` Benjamin Herrenschmidt
2003-03-28 21:25 ` Boris Bezlaj
     [not found]   ` <200303281813.31378.remco@rvt.com>
2003-03-29  8:58     ` Boris Bezlaj
2003-03-29 12:07 ` Paul Mackerras
2003-03-29 15:55   ` Boris Bezlaj
2003-03-30  1:50     ` Paul Mackerras
2003-03-30  8:28       ` Boris Bezlaj
2003-04-14  9:39   ` mikpe
2003-04-14 10:02     ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).