Hello,


Kurt Garloff wrote:

> 
> The result is driver 2.0d8. It has gotten some testing, here and it works
> like a charm. Just one precaution: I was not able to test Tagged Command
> Queuing due to my current setup (will be changed soon). The last time I did
> something wrong wrt to TCQ (it was 1.20g or similar), it could resault in
> lost partition tables. So please print them or have a backup of it. I don't
> think, something like this will happen, though.
> 
> I consider driver 2.0d8 as 2.0e cadidate which should go straight into the
> kernel. Please test!
> 
> You can find it on
> http://www.garloff.de/kurt/linux/dc390/
> 
> Those of you with old, unresolved problems: Are these still existant?
> Thos with no problems: Is the performance increase measurable?
> 

Thank you Garloff-san with the continued
update and improvement of the tmscsim driver!

I checked out the new driver.

The new driver seems to be faster in terms of
decreased CPU time usage.

If this was the only thing, I would just have written to you, but
there was something weired with the older kernel.
That information may be important to non tmscsim-users as well.


Strange thing is, on my current setup, the testing of the new driver
IMMEDIATELY AFTER the

                rmmod (old driver) / insmod (new driver)

slowed down a dd copy of blocks from a partition on an old disk a
bit and seemed to consume more CPU time(?).
I initially thought that somehow the new driver is slower.

HOWEVER, after a while (actually I wrote a short
summary of what I had found out), the new driver
showed BETTER/FASTER result than the older driver.

So I think that the new driver DOES perform better for real.

With this strange experience, I am reporting this to the whole
scsi-linux list, [albeit the fact I am using 2.0.36 :-(] to show that
there could be some strange interaction going on in the SCSI mid-level
layer when the drive insertion/removal takes place.

Please note, in the attached output, the increase of total elapsed
time and the generally high CPU % value with the new driver
IMMEDIATELY AFTER the rmmod/insmod.

I originally thought that this slowdown could be due to the slow
SEAGATE disk I am using.  (5 years old or older.) for this testing,
and I am using an inexpensive AM53C974-based board without BIOS CMOS
setup. I thought maybe some timing assumptions made in the new driver
may not hold on this old disk drive. But I guess I was wrong and
there are some data structures that need some time before
settling down after rmmod/insmod.

I tested the tmscsim driver as a module and measured the disk block
copy speed using dd from a partition in one of the SCSI disk to
/dev/null (*).

   dd if=/dev/sdd5 of=/dev/null bs=512 count=400000

(*) I could not find an easy reliable benchmark program.  If you have
a better idea, please let me know.  Testing should be easy now that
tmscsim can be loaded as a module.  (I only have OS/2 and Solaris 7
partitions in these disks.)

Upgrading to the latest 2.2.x is a little problematic since I now use
Debian and there are some glibc2 and old libc5 mix and match issue
with some application programs I use now, but not impossible I think.

Chiaki Ishikawa


========================================
Background Information.
----------------------------------------

Setup.
CPU: AMD K6-300.
Motherboard: Gigabyte GA586-SG (NO, it is not SG100).
Memory: 96MB (64M DIMM + 32M SIMM)
Card: AM53C974-based SCSI board (MELCO Buffalo IFC-DP.)
      with three hard drives + a 7 disk CD changer on it.
(I have another BusLogic card in the box. Does this matter?)
One IDE disk.
Linux OS version: 
        uname -a output
        Linux standard 2.0.36 #84-pre-2.0 pre-2.0 Sun May 23
        21:15:06 JST 1999 i586 unknown 2.0.36 
(Sorry, I am using
Debian distribution on my current box, and they
support 2.0.36 as of now in the current version.
This may be the cause of the timing problem..)

The drive used in the testing. /dev/sdd
 Host: scsi1 Channel: 00 Id: 03 Lun: 00
 Vendor: SEAGATE  Model: ST12400N         Rev: 8010
 Type:   Direct-Access                    ANSI SCSI revision: 02


========================================
The statistics :
With the old driver.
----------------------------------------

1st step.

/OLD/

First the configuration.

standard:/usr/src/linux# cat /proc/scsi/tmscsim/1 
Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0d 1998/12/25
SCSI Host Nr 1, AM53C974 Adapter Nr 0
IOPortBase 0xe000, IRQLevel 0x0a
MaxID 7, MaxLUN 8, AdapterID 7, SelTimeout 250 ms
TagMaxNum 16, Status 0, ACBFlag 0, GlitchEater 24 ns
Statistics: Cmnds 56, Cmnds not sent directly 0, Out of SRB conds 0
            Lost arbitrations 0
Nr of attached devices: 10, Nr of DCBs: 10
Idx ID LUN Prty Sync DsCn SndS TagQ STOP NegoPeriod SyncSpeed SyncOffs
00  01  00  Yes  Yes  Yes  Yes  Yes  No    124 ns     8.0 M      15
01  03  00  Yes  Yes  Yes  Yes  Yes  No    124 ns     8.0 M      15
02  04  00  Yes  No   Yes  Yes  No   No   (200 ns)
03  04  01  Yes  No   Yes  Yes  No   No   (124 ns)
04  04  02  Yes  No   Yes  Yes  No   No   (124 ns)
05  04  03  Yes  No   Yes  Yes  No   No   (124 ns)
06  04  04  Yes  No   Yes  Yes  No   No   (124 ns)
07  04  05  Yes  No   Yes  Yes  No   No   (124 ns)
08  04  06  Yes  No   Yes  Yes  No   No   (124 ns)
09  05  00  Yes  Yes  Yes  Yes  Yes  No    124 ns     8.0 M      15

----------------------------------------
dd if=/dev/sdd5 of=/dev/null bs=512 count=400000
Measure the timing with /usr/bin/time.
----------------------------------------

standard:/usr/src/linux# /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 
count=400000 
400000+0 records in
400000+0 records out
0.47user 12.49system 0:52.38elapsed 24%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/usr/src/linux# !!
/usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.65user 12.92system 0:53.26elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps

So less then 13 seconds of system time and about 53 seconds of
elapsed time. CPU % - 25%.



========================================
2nd. 
With the NEW driver.

I removed the old driver and then inserted the new driver.  and began
testing IMMEDIATELY afterward and obtained rather SLOW result.

----------------------------------------

/NEW/

First the output from /proc/scsi/tmscsim/1

standard:/usr/src/linux# cat /proc/scsi/tmscsim/1 
Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0d8 1999/06/03
SCSI Host Nr 1, AM53C974 Adapter Nr 0
IOPortBase 0xe000, IRQ 10
MaxID 7, MaxLUN 8, AdapterID 7, SelTimeout 250 ms, DelayReset 1 s
TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
Statistics: Cmnds 56, Cmnds not sent directly 0, Out of SRB conds 0
            Lost arbitrations 0, Connected: No
Nr of attached devices: 10, Nr of DCBs: 10
Map of attached LUNs: 00 01 00 01 7f 01 00 00
Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs
00  01  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15
01  03  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15
02  04  00  Yes  No   Yes  Yes  No   (200 ns)
03  04  01  Yes  No   Yes  Yes  No   (200 ns)
04  04  02  Yes  No   Yes  Yes  No   (200 ns)
05  04  03  Yes  No   Yes  Yes  No   (200 ns)
06  04  04  Yes  No   Yes  Yes  No   (200 ns)
07  04  05  Yes  No   Yes  Yes  No   (200 ns)
08  04  06  Yes  No   Yes  Yes  No   (200 ns)
09  05  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15

----
dd command stat
----

standard:/tmp#  /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 

400000+0 records in
400000+0 records out
0.36user 48.27system 1:25.43elapsed 56%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/tmp# standard:/tmp# !!
 /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.44user 33.68system 1:09.41elapsed 49%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/tmp# !!
 /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.42user 26.44system 1:02.91elapsed 42%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps

(Observation.)
I repeated the test three times thinking that maybe the first dozens
of megabytes of the disk blocks were in the buffer pool in the older
testing. (seemed to be the case.)  Anyway, The copy took longer (more
than 20 seconds.)  The CPU% is up.

In order to see if anything funny happened, this is the output from
/proc/scsi/tmscsim/1 after the above run.  
Nothing seems to be out of ordinary.

standard:/tmp# cat /proc/scsi/tmscsim/1 
Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0d8 1999/06/03
SCSI Host Nr 1, AM53C974 Adapter Nr 0
IOPortBase 0xe000, IRQ 10
MaxID 7, MaxLUN 8, AdapterID 7, SelTimeout 250 ms, DelayReset 1 s
TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
Statistics: Cmnds 10061, Cmnds not sent directly 0, Out of SRB conds 0
            Lost arbitrations 0, Connected: No
Nr of attached devices: 10, Nr of DCBs: 10
Map of attached LUNs: 00 01 00 01 7f 01 00 00
Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs
00  01  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15
01  03  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15
02  04  00  Yes  No   Yes  Yes  No   (200 ns)
03  04  01  Yes  No   Yes  Yes  No   (200 ns)
04  04  02  Yes  No   Yes  Yes  No   (200 ns)
05  04  03  Yes  No   Yes  Yes  No   (200 ns)
06  04  04  Yes  No   Yes  Yes  No   (200 ns)
07  04  05  Yes  No   Yes  Yes  No   (200 ns)
08  04  06  Yes  No   Yes  Yes  No   (200 ns)
09  05  00  Yes  Yes  Yes  Yes  Yes   124 ns     8.0 M      15


========================================
3rd

/NEW: AFTER A WHILE /

After writing a short summary of what I had found, I re-tried the
testing to ponder what was wrong.  
Surprise! 
The copy runs much faster now!?

  261   /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
  262  cat /proc/scsi/tmscsim/1 
  263  cat /proc/scsi/tmscsim/1
  264  cat /proc/scsi/scsi 
  265  uname -a
  266  history
standard:/tmp# !261
 /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.45user 6.53system 0:50.16elapsed 13%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/tmp# !261
 /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.40user 7.06system 0:49.78elapsed 14%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/tmp# !!
 /usr/bin/time dd if=/dev/sdd5 of=/dev/null bs=512 count=400000 
400000+0 records in
400000+0 records out
0.46user 6.85system 0:49.89elapsed 14%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (94major+15minor)pagefaults 0swaps
standard:/tmp# 

        So the elpased time is about 50 seconds.
        But the system CPU time is much shorter now. About half the
        value of old driver! CPU% - 14. Good!

I repeated a test after I finished writing up this memo and
found the result is comparable. The new driver consumes less
system time.

[end of memo]

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to