multiple issues with devstat_*(9)

Alexander Best arundel at freebsd.org
Mon Apr 11 08:38:22 UTC 2011


On Mon Apr 11 11, Alexander Motin wrote:
> Alexander Best wrote:
> > On Sun Apr 10 11, Alexander Motin wrote:
> >> Alexander Best wrote:
> >>> On Thu Apr  7 11, Alexander Motin wrote:
> >>>> Assuming that SCSI and IDE in -t option means transport type, and
> >>>> assuming that we count everything except ATA and SATA as SCSI, I've made
> >>>> following patch, that should fix issues from the CAM side:
> >>>> http://people.freebsd.org/~mav/cam.devstat.patch
> >>> with your patch i get the following output:
> >>>
> >>> otaku% iostat -t ide
> >>>        tty            ada0             ada1             cpu
> >>>  tin  tout  KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
> >>>    6   144 14.21   6  0.09  20.46  40  0.81   2  0  3  0 95
> >>> otaku% iostat -t scsi
> >>>        tty             cd0             cpu
> >>>  tin  tout  KB/t tps  MB/s  us ni sy in id
> >>>    6   146  2.32   0  0.00   2  0  3  0 95
> >>> otaku% iostat -t pass
> >>>        tty           pass0            pass1            pass2             cpu
> >>>  tin  tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
> >>>    6   147  0.36   0  0.00   0.36   0  0.00   0.00   0  0.00   2  0  3  0 95
> >>> otaku% iostat -t da  
> >>>        tty            ada0             ada1             cpu
> >>>  tin  tout  KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
> >>>    6   147 14.21   6  0.08  20.46  37  0.75   1  0  3  0 95
> >>> otaku% iostat -t cd
> >>>        tty             cd0             cpu
> >>>  tin  tout  KB/t tps  MB/s  us ni sy in id
> >>>    7   147  2.32   0  0.00   1  0  3  0 95
> >>> otaku% iostat -t other
> >>>        tty            cpu
> >>>  tin  tout us ni sy in id
> >>>    7   149  1  0  3  0 95
> >>> otaku% iostat -n 100  
> >>>        tty            ada0             ada1              cd0            pass0            pass1            pass2             cpu
> >>>  tin  tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
> >>>    6   135 14.21   5  0.07  20.44  32  0.64   2.32   0  0.00   0.36   0  0.00   0.36   0  0.00   0.00   0  0.00   1  0  3  0 96
> >>>
> >>> the the remaining issues imho are:
> >>>
> >>> 1) ada* and cd* are SATA/ATA devices. so i think they should show up together
> >>>    either under ide *or* scsi. i don't have any *real* scsi devices.
> >> I've just retested the patch and haven't reproduced your problem:
> >> %iostat -d
> >>              da0             ada0              da1              cd0
> >>   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s
> >>   0.01   0  0.00   3.27   1  0.00   2.65   1  0.00   0.00   0  0.00
> >> %iostat -d -t ide
> >>              da0             ada0              cd0
> >>   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s
> >>   0.01   0  0.00   3.27   1  0.00   0.00   0  0.00
> >> %iostat -d -t scsi
> >>              da1
> >>   KB/t tps  MB/s
> >>   2.65   1  0.00
> >> %iostat -d -t pass
> >>            pass0            pass1            pass2            pass3
> >>   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s
> >>   0.00   0  0.00   0.00   0  0.00   0.00   0  0.00   0.00   0  0.00
> >> %iostat -d -t ide,pass
> >>            pass0            pass1            pass2
> >>   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s
> >>   0.00   0  0.00   0.00   0  0.00   0.00   0  0.00
> >> %iostat -d -t scsi,pass
> >>            pass3
> >>   KB/t tps  MB/s
> >>   0.00   0  0.00
> >>
> >> da0 is an PATA ATAPI ZIP, da1 - USB floppy, ada0 - SATA HDD, cd0 - PATA
> >> ATAPI CD-ROM.
> >>
> >> Just an idea, aren't you are using legacy ata(4) + atapicam for your
> >> cd0? atapicam lies that it's buses are SPI (SCSI).
> > 
> > my cd0 is a pata atapi dvdrom drive and i have the following in my kernel conf:
> > 
> > device          atacore
> > device          ahci
> > device          atajmicron
> > device          atapci
> > #device         atapicd
> > device          atapicam
> > 
> > device          umass
> > device          scbus
> > device          cd
> > device          pass
> > device          da
> > device          random
> > device          pty
> > device          md
> > 
> > the dmesg entries for cd0 are:
> > 
> > cam_periph_alloc: attempt to re-allocate valid device cd0 rejected
> > cdasync: Unable to attach new device due to status 0x6
> > cd0 at ata2 bus 0 scbus8 target 0 lun 0
> > cd0: <HL-DT-ST DVDRAM GSA-H10N JL12> Removable CD-ROM SCSI-0 device 
> > cd0: 3.300MB/s transfers
> > cd0: cd present [2149024 x 2048 byte records]
> 
> Aha, that's it. It is atapicam's lie. atapicam is one of a things that
> will go away during migration to CAM ATA. If you remove `device
> atapicam`, but add `options ATA_CAM` instead, CAM will manage that bus
> directly and report it as ATA.

thanks for the hint. i also read the following in the ahci(4) man page:

"     Driver features include support for Serial ATA and ATAPI devices, ..."

...does that mean that my DVD drive can also attach to the ahci driver?

cheers.
alex

> 
> -- 
> Alexander Motin

-- 
a13x


More information about the freebsd-scsi mailing list