NetBSD-Bugs archive

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

Re: port-mac68k/24883 Patch for DMA SCSI on Quadra AV's



The following reply was made to PR port-mac68k/24883; it has been noted by GNATS.

From: Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>, mrz5149%acm.org@localhost
Cc: 
Subject: Re: port-mac68k/24883 Patch for DMA SCSI on Quadra AV's
Date: Tue, 16 Oct 2018 20:36:54 +0900

 I updated the patch to catch up with -current as of today, which
 improves disk IO performance by nearly one order of magnitude for
 AV Mac (Quadra / Centris 660AV / 840AV).
 
 http://www.netbsd.org/~rin/avdma_20181002.patch
 
 Currently, DMA transfer for internal SCSI adapter of AV Mac is not
 supported. This results in not only miserable disk IO performance,
 loss of clock interrupts as well due to heavy SCSI PIO.
 
 Michael Zucca, the submitter of this PR, analyzed the DMA engine for
 AV Mac to implement DMA support for internal SCSI adapter. In the PR,
 IMO, he was too pessimistic to its performance. And he did not show
 any quantitative benchmarks. These may be why this PR has been left
 untouched unfortunately over 10 years.
 
 I found that his efforts succeeded more than he expected. Benchmarks
 attached below show that the disk performance improves nearly one
 order of magnitude. And clock interrupts are not lost anymore as far
 as I can see. It may be not perfect, as the original submitter
 pointed out, however the disk IO gets faster at least than NFS via
 mc(4) (for which DMA is already enabled).
 
 I made minimum changes to his patch to catch up with -current, as
 well as some KNF. Also, an off by one bug for PIO was fixed, and
 sc->sc_minsync was changed to zero. Both are necessary in order to
 attach one of my disks. Otherwise, I observed the following errors:
 
 sd0 at scsibus0 target 0 lun 0: <QUANTUM, ATLAS_V__9_WLS, 0230> disk fixed
 sd0: 8755 MB, 20907 cyl, 2 head, 428 sec, 512 bytes/sect x 17930694 sectors
 esp0: !TC on MSG OUT [intr 10, stat 83, step 1] prevphase 6, resid 4
 sd0(esp0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
 SENSE KEY:  Aborted Command
 ASC/ASCQ:  Invalid Message Error
 
 Although I have not fully understood the patch and more works may be
 necessary before committing, the patch works fine without problem
 nearly two weeks on my 840AV. Any comments and suggestions are
 welcomed because I'm not familiar to SCSI, DMA, nor esp(4) driver,
 i.e., everything ;-). I hope someone still has AV Mac especially
 660AV in the working condition.
 
 BENCHMARKS
 ----------
 
 (1) 64KB block read/write (x 1024) to raw device
 (time dd if/of=/dev/rsd2b of/if=/dev/zero bs=64k count=1024)
 
 * before enabling DMA
 
 - RD 6:15 -> 175KB/s
 - WR 6:35 -> 166KB/s
 
 Here, time(1) reports wrong elapsed times (b/w 1:30 to 2:00) because
 significant parts of clock interrupts are lost due to heavy SCSI PIO.
 
 * after enabling DMA
 
 - RD 0:57 --> 1150KB/s
 - WR 0:53 --> 1240KB/s
 
 Now, time(1) reports sane elapsed times.
 
 (2) read/write to filesystem by using pkgsrc/benchmarks/bonnie
 
 * after enabling DMA
 
                -------Sequential Output-------- ---Sequential Input-- --Random--
                -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
 Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
            100   822 93.8  1155 48.7   729 53.8   744 87.7  1374 49.0 148.8 84.9
 
 * c.f. tmpfs
 
                -------Sequential Output-------- ---Sequential Input-- --Random--
                -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
 Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
             50   854 99.1  2726 99.2  2162 99.3   887 99.2  3793 99.3 212.7 98.9
 
 * c.f. NFS (UDPv4) via mc(4)
 
                -------Sequential Output-------- ---Sequential Input-- --Random--
                -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
 Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
            100   438 55.5   558 21.7   288 24.3   435 50.5   661 26.6  62.0 64.5
 


Home | Main Index | Thread Index | Old Index