We are not able to achieve throughput in MBs using P5020 SATA
controller. The Kernel version is 3.0.6 i.e. DPAA v1.1 and sata
driver is fsl_sata.c.
Following is the u-boot output which shows board configurations:
U-Boot 2011.09 (Jan 16 2013 - 17:05:32)
CPU0: P5020E, Version: 1.0, (0x82280010)
Core: E5500, Version: 1.0, (0x80240010)
Clock Configuration:
CPU0:1800 MHz, CPU1:1800 MHz,
CCB:800 MHz,
DDR:500 MHz (1000 MT/s data rate) (Asynchronous), LBC:100 MHz
FMAN1: 400 MHz
PME: 400 MHz
L1: D-cache 32 kB enabled
I-cache 32 kB enabled
Board: NAMC_P5020
Reset Configuration Word (RCW):
00000000: 10540000 00000000 24240000 00000000
00000010: 54402a00 c0002000 fe800000 01000000
00000020: 00000000 00000000 00000000 00070000
00000030: 00000000 00000000 00000000 00000000
I2C: ready
SPI: ready
DRAM: Initializing.... DDR: 2 GiB (DDR3, 64-bit, CL=9, ECC off)
Flash: 128 MiB
L2: 512 KB enabled
Corenet Platform Cache: 2048 KB enabled
Bank1: PCIE1 PCIE1 PCIE1 PCIE1 PCIE2 PCIE2 PCIE2 PCIE2 NA NA
Bank2: XAUI_FM1 XAUI_FM1 XAUI_FM1 XAUI_FM1
Bank3: NA NA SATA1 SATA2
SRIO1: disabled
SRIO2: disabled
NAND: 1024 MiB
EEPROM: Read failed.
PCIe1: Root Complex, no link, regs @ 0xe0200000
PCIe1: Bus 00 - 00
PCIe2: Root Complex, no link, regs @ 0xe0201000
PCIe2: Bus 01 - 01
PCIe3: disabled
In: serial
Out: serial
Err: serial
RapidIO: HOST device id 0x00000000, vendor id 0x00000000
RapidIO: PHY type: parallel
RapidIO: Port1 is trained successfully. ESCSR = 0x00000000
RapidIO: PHY type: parallel
RapidIO: Port2 is trained successfully. ESCSR = 0x00000000
magic number doesn't match. read 0xffff, must be 0xa570
BInfo: invalid
Net: Fman1: Uploading microcode version 92.8.0
FM1@DTSEC4 connected to Broadcom BCM5461S
PHY reset timed out
FM1@DTSEC5 connected to Generic PHY
FM1@TGEC1 connected to Generic 10G PHY
FM1@DTSEC4, FM1@DTSEC5, FM1@TGEC1
Hit any key to stop autoboot: 5
Following is the Kernel logs of SATA along with HardDisk info:
fsl-sata e0220000.sata: Sata FSL Platform/CSB Driver init
scsi0 : sata_fsl
ata1: SATA max UDMA/133 irq 68
fsl-sata e0221000.sata: Sata FSL Platform/CSB Driver init
scsi1 : sata_fsl
ata2: SATA max UDMA/133 irq 69
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: WDC WD5000BPVT-60HXZT3, 01.01A01, max UDMA/133
ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
ata1: No Device OR PHYRDY change,Hstatus = 0xa0000000
ata1: SATA link down (SStatus 0 SControl 300)
scsi 1:0:0:0: Direct-Access ATA WDC WD5000BPVT-6 01.0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sda: sda1
sd 1:0:0:0: [sda] Attached SCSI disk
Following is the throughput test result:
namc-p4080:~# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 2 MB in 3.31 seconds = 619.38 kB/sec
namc-p4080:~# hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 2 MB in 3.02 seconds = 677.99 kB/sec
Timing buffered disk reads: 2 MB in 3.03 seconds = 676.78 kB/sec
Following is the driver status register:
SError(0x221104) => 0x00200900
LinkStatus1(0x221158) => 0xff000000
Any hint in getting the maximum throughput on reading/writing the SATA
disk will be highly appreciated.
Thanks and regards
Thomas
Please see technical support comment:
There is a patch to change TransCfg [RX_WATER_MARK ] at runtime, it can help performance, link is:
http://linux.freescale.net/patchwork/patch/21902/
Below is an example on p3041:
p3041ds login: root
root@p3041ds:~# uname -a
Linux p3041ds 3.8.10-rt6-00980-g67b6708 #2 SMP PREEMPT RT Tue May 21 19:26:17 CST 2013 ppc GNU/Linux root@p3041ds:~# find /sys/ -name rx_watermark /sys/devices/ffe000000.soc/ffe221000.sata/rx_watermark
/sys/devices/ffe000000.soc/ffe220000.sata/rx_watermark
root@p3041ds:~# cat /proc/interrupts | grep sata
68: 0 0 0 49 OpenPIC Level fsl-sata
69: 0 0 0 0 OpenPIC Level fsl-sata
root@p3041ds:~# cat /sys/devices/ffe000000.soc/ffe220000.sata/rx_watermark
16
root@p3041ds:~# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 547 MB in 3.00 seconds = 186402 kB/s root@p3041ds:~# echo 18 > /sys/devices/ffe000000.soc/ffe220000.sata/rx_watermark
root@p3041ds:~# cat /sys/devices/ffe000000.soc/ffe220000.sata/rx_watermark
18
root@p3041ds:~# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 600 MB in 3.00 seconds = 204785 kB/s root@p3041ds:~#
Hi Lumin,
Thanks for your answer. This problem is solved now. It was due to older revision of Silicon we were using.
Adeel
My pleasure, and thanks for sharing.