LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2005, 02:09 AM   #16
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
UDMA mask in sata_sil.c (udma_mask)


Hi forevertheuni

In sata_sil.c the udma mask 0x3f is for DMA 0-5
So it is normal our HD are stucked to UDMA100 because UDMA133 is DMA6

I have read the reason for this somewhere:
Quote:
ChangeSet@1.1358, 2004-03-18 06:29:00-05:00, jgarzik@redhat.com
[libata sata_sil] add post-set-mode hook to libata, use it

Silicon Image has a register that indicates the data transfer mode
(pio-old, pio-new, mdma or udma) that must be initialized after
the SET FEATURES - XFER command has been issued. This requires a
hook in libata core to set the register at the right time.

Also, limit to UDMA5 due to scary comments in FreeBSD about chip errata
The masks in ide-dma.c are 0x1f and 0x7f (0x3f for sata_sil)

I am not sure I know enough to recompile the kernel module,
but I could try. I do not know how the mask works (the hexa stands
for a list of binary flags once converted hex->bin)
I will probabled need to try 0x7f...

Here is a brief extract of my kernel
(next post will be a fuller edited kernel, that I will delete once
you have made a copy of it, 42 kb)
cat /usr/src/linux-2.6.8.1-10mdk/.config | egrep -i 'ata|raid' > configbrief.txt

# CONFIG_X86_MCE_NONFATAL is not set
# ATA/ATAPI/MFM/RLL support
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_AACRAID=m
CONFIG_SCSI_MEGARAID=m
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_SVW=m
CONFIG_SCSI_ATA_PIIX=m
CONFIG_SCSI_SATA_NV=m
CONFIG_SCSI_SATA_PROMISE=m
CONFIG_SCSI_SATA_SX4=m
CONFIG_SCSI_SATA_SIL=m
CONFIG_SCSI_SATA_SIS=m
CONFIG_SCSI_SATA_VIA=m
CONFIG_SCSI_SATA_VITESSE=m
CONFIG_SCSI_EATA=m
CONFIG_SCSI_EATA_TAGGED_QUEUE=y
# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set
CONFIG_SCSI_EATA_MAX_TAGS=16
CONFIG_SCSI_EATA_PIO=m
# Multi-device support (RAID and LVM)
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
CONFIG_MD_RAID6=m
CONFIG_ATALK=m
CONFIG_USB_STORAGE_DATAFAB=y
# CONFIG_ATARI_PARTITION is not set
CONFIG_ITERAID=m

Last edited by Emmanuel_uk; 02-25-2005 at 01:48 AM.
 
Old 02-24-2005, 02:13 AM   #17
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
kernel configuration (temp) part 1/2

Have a look (I have removed some sections that I thought were irrelevant, like pcmcia)
Will then "delete" message

deleted section

Last edited by Emmanuel_uk; 02-25-2005 at 01:50 AM.
 
Old 02-24-2005, 02:14 AM   #18
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
kernel config part 2 tmp

deleted

Last edited by Emmanuel_uk; 02-25-2005 at 01:49 AM.
 
Old 02-24-2005, 11:22 AM   #19
forevertheuni
LQ Newbie
 
Registered: Oct 2004
Posts: 14

Rep: Reputation: 0
i'll give you my .config is pretty much compact and working 100%...when I go to my a7n8x-e deluxe i'll post it here ..or a link to it . you probably just need to modify the .c file of sil_sata(the thing you posted) and compile the kernel normally . make ; make modules_install install (in mandrake should be all that is enough)
 
Old 02-25-2005, 01:57 AM   #20
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
kernel 2.6.7 to 2.6.8.1 and sata sil3112a

Hi forevertheuni

Did you have a look to this, it seems to be a problem a bit similar to yours:
http://www.thisishull.net/archive/in...p/t-23170.html
 
Old 03-01-2005, 02:59 AM   #21
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
[edit 01/04/05 project still live - will try compiling module on its own in the next 2 weeks or when I can find time for it. Will eventually do it]

Will post results once I have recompiled the module
(I am holding back; I have read a lot about kernel compilation but
am still a bit worried; I still wonder if I could compile the module on its own
(and then move the new module in place of the old kernel module)
without doing a whole kernel compilation

Last edited by Emmanuel_uk; 04-01-2005 at 12:56 AM.
 
Old 04-22-2005, 07:52 AM   #22
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
Hi.
Will post results of recompiling the sata_sill module whenever possible.
I have installed another HD so I can mess around with kernel compilation.
Regards
 
Old 05-27-2005, 02:25 AM   #23
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
module compilation on its way but problem with dkms

Project still live.
I figured out for myself that I could use dkms to rebuild the the
sata_sil module on its own. However the newbee I am
is now fighting a make error. This is posted as a new topic:

http://www.linuxquestions.org/questi...51#post1663151

My appology: it may look like a double posting, dooHHHH!
I meant to let potentially subscribed people to this thread
that I was making progress again.

Last edited by Emmanuel_uk; 05-27-2005 at 02:35 AM.
 
Old 06-08-2005, 02:25 AM   #24
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,605

Original Poster
Rep: Reputation: 53
Smile SATA raid0 forced to ATA133 (udma6) - success but no improvement as expected

I eventually managed to get my SATA raid0 forced to ATA133.
Ok, Electro (senior member) warned me that there should be no much
improvement (+ it can be unstable as mentioned in sata_sil.c)
Patch, benchmark data etc below.

Anyway I was curious to see why my raid was not as fast as I thought it would be. Also I had read a bit about sata being currently a bit of hipe, with no
real gain speed compared to good IDE drives, it was still tempting to try and learn these things first hand. And I learned a lot.

Here are the resuls (all in Mb/s, but threadsize in Mb). Note the stddev is given only for the "linear/sequential write". The rate (Mb/s) is the median of 3 to 10 tests, because delays in the HD (latency) can affect the results quite a bit (yes, I is not the mean). I recommend ploting Mb/s against log(threadsize).
I might do some more runs using the perl script with tiobench which should aleviate this "artefact".

The overall result, for now, is that there is no real improvement
from groing ata100 to ata133: it is within the statistical error of
the small amount of tests I performed.

Raid as ATA100 (UDMA5)
Thread Write Stddev RndW Read RndRead
300 102.9 0 3.4 43.8 1.3
200 97.6 0.4 3.8 41.1 1.7
100 94.4 1.4 4.6 124.4 12.2
25 71.1 3.8 7.5 338.0 326.0
10 74.0 8.6 10.5 339.5 331.7
5 70.6 3.1 19.2 337.4 336.5
4 69.0 14.7 25.8 337.0 337.0
3 67.8 4 38.5 334.9 338.0
2 61.8 10.8 108.0 333.7 343.0
1 49.0 3.8 225.0 330.0 356.0

Command run as root, from a pata drive, no other major process
# ./tiobench-0.3.3/tiotest -f threadsize -d /myraid/test
Tiotest results are for 4 concurrent io threads: (that is a threadsize of 25 Mb write 100 Mb to the raid area)

raid0, ext3 journalised, Chunk Size : 32K, mdadm Version : 00.90.01
160 GB WD Caviar SATA 7200 rpm 8 Mo cache model: WD1600JD-00HBB0
(Disabled Spread Spectrum Clocking on the Western digital HD)
libata version 1.02 sata_sil version 0.54
BIOS version for the sil3112a 4.2.27 (27 or 47)
mobo ASUS A7N8X-E deluxe, Kernel 2.6.8.1-10mdk
tiobench-0.3.3

sata_sil: version magic '2.6.8.1-10mdkcustom 686 gcc-3.4' should be '2.6.8.1-10mdk 686 gcc-3.4'
sata_sil: no version magic, tainting kernel.
sata_sil version 0.54
ata1: SATA max UDMA/133 cmd 0xE0ADC080 ctl 0xE0ADC08A bmdma 0xE0ADC000 irq 11
ata2: SATA max UDMA/133 cmd 0xE0ADC0C0 ctl 0xE0ADC0CA bmdma 0xE0ADC008 irq 11
ata1: dev 0 cfg 49:2f00 82:346b 83:7f61 84:4003 85:3469 86:3c41 87:4003 88:207f
ata1: dev 0 ATA, max UDMA/133, 312581808 sectors: lba48
ata1: dev 0 configured for UDMA/133

Raid as ATA133 (UDMA6)
Thread Write Stddev RndW Read RndRead
300 102.3 0 3.3 43.3 1.3
200 99.1 0.2 3.7 41.9 1.7
100 96.2 2 4.4 73.5 8.0
25 72.4 1 7.3 333.6 320.8
10 79.9 5.6 10.2 332.5 325.5
5 75.8 12.1 18.6 332.0 329.7
4
3
2 77.2 9.5 107.0 336.0 341.0
1 57.1 13 211.0 330.5 341.0

Here is the patch. I used the command make modules.
(I still do not understand how to use dkms).
Then I used gzip to compress the newer sata_sil.ko.
I backed-up and replaced the old sata_sil.ko.gz.
I did not have time to figure out how to change
the module magic version, so I manually loaded the
module with a forced modprobe command after booting.
So it is a bit messy, but that is all I wanted to do
(I did not want to do a full kernel compilation).

--- sata_sil.c.orginal 2005-06-05 19:59:49.506160016 +0100
+++ sata_sil.c 2005-06-05 20:00:30.413941088 +0100
@@ -152,7 +152,9 @@
ATA_FLAG_SRST | ATA_FLAG_MMIO,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
- .udma_mask = 0x3f, /* udma0-5 */
+ //.udma_mask = 0x3f, /* udma0-5 */
+ .udma_mask = 0x7f, /* udma0-6 mask to account for ata133*/
+ // Note this may make your HD unstable. Gain of speed unsure as well. Emmanuel_uk.
.port_ops = &sil_ops,
}, /* sil_3114 */
{

Last edited by Emmanuel_uk; 06-08-2005 at 02:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 04:49 AM
"backtrace appears to be useless" ungua SUSE / openSUSE 2 11-13-2005 01:07 PM
how to add "hdparm -c 1 -d 1 -k 1 /dev/hda" to startup script (as root)? jimothy05 Linux - Distributions 2 10-07-2004 08:32 AM
SIL3112A Software-Raid weird hdparm -t results biatche Linux - Hardware 0 05-25-2004 06:33 AM
hdparm -d1 "Opperation not permitted" slackMeUp Slackware 6 11-23-2003 12:12 PM


All times are GMT -5. The time now is 03:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration