tech-kern archive

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

Re: mpt Serious performance issues



Hi all,

some new findings: I´ve added some debug statements to the driver
while only vaguely knowing what I am doing...

mpt0 at pci2 dev 5 function 0: vendor 0x1000 product 0x0030
mpt0: interrupting at ioapic1 pin 1
mpt0: DEBUG: Reading MPI_CONFIG_PAGETYPE_RAID_VOLUME 0 Header
mpt0: DEBUG: Secussfully read MPI_CONFIG_PAGETYPE_RAID_VOLUME 0 Header
mpt0: DEBUG: Reading raid page 0
mpt0: DEBUG: Successfully read raid page 0
mpt0: DEBUG: Volume ID: 0
mpt0: DEBUG: Write Cache: 1
scsibus0 at mpt0: 16 targets, 8 luns per target
sd0 at scsibus0 target 0 lun 0: <LSILOGIC, 1030          IM, 1000> disk fixed
sd0: fabricating a geometry
sd0: 69400 MB, 69400 cyl, 64 head, 32 sec, 512 bytes/sect x 142131200 sectors
sd0: fabricating a geometry
mpt0: DEBUG: mpt_set_xfer_mode() called
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_TQING is set TRUE
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_WIDE16 is set TRUE
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_SYNC is set TRUE
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_SYNC is set to Ultra320 mode
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_SYNC is set to at least
Ultra160 mode
mpt0: DEBUG: mpt_set_xfer_mode(): Reading raid page 0
mpt0: DEBUG: mpt_set_xfer_mode(): Successfully read raid page 0
mpt0: DEBUG: mpt_set_xfer_mode(): Volume ID: 0
mpt0: DEBUG: mpt_set_xfer_mode(): Write Cache: 1
sd0: sync (6.25ns offset 127), 16-bit (320.000MB/s) transfers, tagged queueing
mpt0: DEBUG: mpt_set_xfer_mode() called
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_TQING is set FALSE
mpt0: DEBUG: mpt_set_xfer_mode(): PERIPH_CAP_WIDE16 is set FALSE
mpt0: DEBUG: mpt_set_xfer_mode(): Reading raid page 0
mpt0: DEBUG: mpt_set_xfer_mode(): Successfully read raid page 0
mpt0: DEBUG: mpt_set_xfer_mode(): Volume ID: 0
mpt0: DEBUG: mpt_set_xfer_mode(): Write Cache: 1
ses0: async, 8-bit transfers

What did I do?

I started by adding the PERIPH_CAP_* prints to mpt_set_xfer_mode().
One can see that for the virtual disk everything we need is requested
(tagged queueing, 16 bit wide mode, syncronous mode, Ultra320 mode).
For the ses0 device these options are not set which is ok as thats a
sensor device AFAIK.

Obviously the driver does handle absolutely nothing regarding RAID
sets. So I extended the structure "mpt_softc" (in mpt_netbsd.h) to
contain a fCONFIG_PAGE_RAID_VOL_0 type. Next I made the
mpt_read_cfg_page() function capable of reading that page:

        } else if (cfgp->Header.PageType == MPI_CONFIG_PAGETYPE_RAID_VOLUME  &&
            cfgp->Header.PageNumber == 0) {
                amt = sizeof (fCONFIG_PAGE_RAID_VOL_0);
        }


What I have learned is that there are SCSI mode pages which I think
every physical disk provides in order to deliver its features. I think
that for virtual disks (= RAID sets) the controller emulates such mode
pages so that the operating system can handle these as "normal SCSI
disks". What I do not understand is what the mpt_softc structure is
allocated for; for the RAID controller or for a single target (e.g. a
RAID set, a physical disk or a ses* device). For now I am querying the
RAID page in mpt_read_config_info_spi() and mpt_set_xfer_mode() and I
have no idea if that it reasonable.

Code:
======
        mpt_prt(mpt, "DEBUG: Reading MPI_CONFIG_PAGETYPE_RAID_VOLUME 0 Header");
        rv = mpt_read_cfg_header(mpt, MPI_CONFIG_PAGETYPE_RAID_VOLUME, 0,
            0, &mpt->mpt_raid_page0.Header);
        if (rv) {
                return (-1);
        }
        else {
                mpt_prt(mpt, "DEBUG: Secussfully read
MPI_CONFIG_PAGETYPE_RAID_VOLUME 0 Header");
        }

...

        mpt_prt(mpt, "DEBUG: Reading raid page 0");
        rv = mpt_read_cfg_page(mpt, 0, &mpt->mpt_raid_page0.Header);
        if (rv) {
                mpt_prt(mpt, "DEBUG: Unable to read raid page 0");
        }
        else {
                mpt_prt(mpt, "DEBUG: Successfully read raid page 0");
                mpt_prt(mpt, "DEBUG: Volume ID: %d",
mpt->mpt_raid_page0.VolumeID);
                mpt_prt(mpt, "DEBUG: Write Cache: %x",
mpt->mpt_raid_page0.VolumeSettings.Settings &
MPI_RAIDVOL0_SETTING_WRITE_CACHING_ENABLE);
        }

======


Just for clarification: What does IOC and SPI stand for?

Regards,

Stephan


Home | Main Index | Thread Index | Old Index