Dma?

Packaging/Compiling/Client Information Forums, including Author's chit chat forum and soon others.

Postby Th3_uN1Qu3 » Mon Apr 16, 2007 7:22 am

I finally got brave enough to try this. I want to enable DMA for my FTP hard drive, since LAN transfers are not even close to what they should be (2MB/s max) and use way too much CPU, slowing down internet connectivity. :huh:

So, what do i need to recompile the kernel for DMA support? My FREESCO box is an old Fujitsu PC, the chipset is OPTi, don't really remember the exact model now. :P I'll take a look at it if you need the model.

So, how am i going to tackle this?
User avatar
Th3_uN1Qu3
Junior Member
 
Posts: 34
Joined: Wed Mar 14, 2007 6:02 pm

Postby Peppe/Sweden » Mon Apr 16, 2007 11:20 am

Precompiled kernel and hdparm is located over <a href='http://lewys-spot.dyndns.org/' target='_blank'>here.</a>


Good luck! :)
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Postby dRB » Mon Apr 16, 2007 11:36 am

I've added the following line to the boot section of the rc_user script:
Code: Select all
hdparm -qc1 -qu1 -qm16 -qd1 /dev/hda


-q .. change next setting quietly
-c1 .. get/set ide 32-bit
-u1 .. get/set unmaskirq flag
-m16 .. get/set multiple sector count
-d1 .. get/set using_dma flag

big difference...

from:
64 MB in 13.39 seconds = 4.78 MB/sec

to:
128 MB in 0.66 seconds =193.94 MB/sec


/dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby CDFiXER » Tue Apr 17, 2007 12:33 pm

the chipset is OPTi


Auuuggghhhh, run away!

Good luck on getting decent numbers out of it. If it is very old it may not even have DMA support, or limit it to certain slots or no slots at all, just internal system transfers.
Catapultam habeo.
Nisi pecuniam omnem mihi dabis, ad caput tuum saxum
immane mittam.
User avatar
CDFiXER
Advanced Member
 
Posts: 380
Joined: Tue Jan 07, 2003 1:45 am

Postby Th3_uN1Qu3 » Wed Apr 18, 2007 11:45 am

<!--QuoteBegin-CDFiXER+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (CDFiXER)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Auuuggghhhh, run away!

Good luck on getting decent numbers out of it. If it is very old it may not even have DMA support, or limit it to certain slots or no slots at all, just internal system transfers.[/quote]

It has DMA support for sure. Back when i had Windoze 98 installed on it it used to run much smoother when enabling DMA from the OS. What modes can it support, i haven't got a clue. But i am gonna find out! ;)

Thanks for the links, i'll get the patched kernel now.

dRB, thanks man! I can handle hdparm by myself though, i've used Ubuntu in the past. :D

Now let's see what i can get out of this box. B)

Later Edit: I have a Pentium @ 133MHz. The readme says 686 kernels will run only on Pentipros, MMXs or higher. The highest 586 kernel i could find is the 035 kernel. I have 037 installed. Can i use that kernel or will there be issues?
User avatar
Th3_uN1Qu3
Junior Member
 
Posts: 34
Joined: Wed Mar 14, 2007 6:02 pm

Postby Lightning » Wed Apr 18, 2007 6:54 pm

Can i use that kernel or will there be issues?

You can use that kernel without any real side effects, however I did just compile a kernel with the new 038 kernel source that might be a better choice to try out.
<a href='http://lewys-spot.dyndns.org/kernels/' target='_blank'>http://lewys-spot.dyndns.org/kernels/</a>
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby Th3_uN1Qu3 » Fri Apr 20, 2007 4:48 am

I got your new kernel, but DMA still doesn't work. Had a lot of troubles with the HDD as well, but got them sorted out.

Anyway, when i try to set the DMA flag using hdparm, i get the following error: HDIO_SET_DMA failed: Operation not permitted.

What can i do about it?
User avatar
Th3_uN1Qu3
Junior Member
 
Posts: 34
Joined: Wed Mar 14, 2007 6:02 pm

Postby justdave » Fri Apr 20, 2007 11:54 am

Please post or pm the results of a "cat /proc/pci" and dmesg and I will see if we can do a kernel modification.
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA

Postby Th3_uN1Qu3 » Fri Apr 27, 2007 10:24 am

Sorry for the late reply, but i've been pretty busy lately. BTW, i'm running the 038 686 kernel (kernel-038.cd-686-triton-vipc-power_off) without any issues. It seems to run better than the 586 one. B)

SSH + root FTP access + FlashFXP = absolute ownage. :D Full control of my box from anywhere, and easier than using floppies too. :rolleyes:

Here's the results you requested:

cat /proc/pci:

Code: Select all
PCI devices found:
  Bus  0, device  20, function  0:
    IDE interface: OPTi 82C621 (rev 17).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  No bursts.
      I/O at 0x500.
  Bus  0, device  13, function  0:
    VGA compatible controller: ATI 215CT222 (rev 9).
      Medium devsel.  Fast back-to-back capable.  IRQ 255.
      Non-prefetchable 32 bit memory at 0xc0000000.
      I/O at 0xa100.
  Bus  0, device   7, function  0:
    Ethernet controller: Realtek 8139 (rev 16).
      Medium devsel.  Fast back-to-back capable.  IRQ 11.  Master Capable.  Latency=32.  Min Gnt=32.Max Lat=64.
      I/O at 0xe00.
      Non-prefetchable 32 bit memory at 0x81000200.
  Bus  0, device   6, function  0:
    Ethernet controller: Realtek 8139 (rev 16).
      Medium devsel.  Fast back-to-back capable.  IRQ 12.  Master Capable.  Latency=32.  Min Gnt=32.Max Lat=64.
      I/O at 0x600.
      Non-prefetchable 32 bit memory at 0x81000000.
  Bus  0, device   1, function  0:
    ISA bridge: OPTi 82C558 Viper-M ISA+IDE (rev 17).
      Medium devsel.  Master Capable.  No bursts.
  Bus  0, device   0, function  0:
    Host bridge: OPTi 82C557 Viper-M (rev 21).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  No bursts.


dmesg:

Code: Select all
Memory: sized by int13 088h
Console: 16 point font, 400 scans
Console: colour VGA+ 80x25, 1 virtual console (max 63)
pcibios: BIOS32 Service structure at 0x000eb800
pcibios: BIOS32 Service entry at 0xfd814
pcibios: BIOS32 Service structure at 0x000fd800
pcibios: PCI BIOS 2.01 entry at 0xfd840
Probing PCI hardware.
Calibrating delay loop.. ok - 53.04 BogoMIPS
Memory: 29896k/32768k available (776k kernel code, 384k reserved, 740k data)
Swansea University Computer Society NET3.035 for Linux 2.0
NET3: Unix domain sockets 0.13 for Linux NET3.035.
Swansea University Computer Society TCP/IP for NET3.034
IP Protocols: IGMP, ICMP, UDP, TCP
Linux IP multicast router 0.07.
Checking 386/387 coupling... fpu using exception 16.
Checking 'hlt'... Ok.
Pentium F0 0F bug - patch enabled.
IDT readonly ...  ... done
Linux version 2.0.39 (Lightning@Third-party-FREESCO-kernel) (gcc version 2.7.2.3) #20 Tue Mar 27 22:37:35 PST 2007
Starting kswapd v 1.4.2.2
Serial driver version 4.13p1 with no serial options enabled
APM BIOS not found.
Real Time Clock Driver v1.09
Ramdisk driver initialized : 16 ramdisks of 16384K size
loop: registered device at major 7
hda: WDC WD1200JB-00GVA0, 114472MB w/8192kB Cache, CHS=14593/255/63
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
Ethernet Bridge 002 for NET3.035 (Linux 2.0)
PPP: version 2.3.11 (demand dialing)
TCP compression code copyright 1989 Regents of the University of California
PPP line discipline registered.
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
CSLIP: code copyright 1989 Regents of the University of California.
Partition check:
 hda: hda1
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
VFS: Can't find an ext2 filesystem on dev 03:01.
UMSDOS Beta 0.6 (compatibility level 0.4, fast msdos)
3c59x.c:v0.99H 11/17/98 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
ne.c: No PCI cards found. Use "io=0xNNN" value(s) for ISA cards.
ne2k-pci.c:v0.99L 2/7/98 D. Becker/P. Gortmaker http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html
  The PCI BIOS has not enabled the device at 0/48!  Updating PCI command 0103->0107.
rtl8139.c:v1.04 9/22/98 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/rtl8139.html
eth0: RealTek RTL8139 Fast Ethernet at 0x600, IRQ 12, 00:e0:4c:3c:0e:10.
  The PCI BIOS has not enabled the device at 0/56!  Updating PCI command 0103->0107.
eth1: RealTek RTL8139 Fast Ethernet at 0xe00, IRQ 11, 00:50:22:e6:2e:f7.
smc-ultra.c: Presently autoprobing (not recommended) for a single card.
smc-ultra.c: No SMC Ultra card found (i/o = 0x0).
User avatar
Th3_uN1Qu3
Junior Member
 
Posts: 34
Joined: Wed Mar 14, 2007 6:02 pm

Postby Th3_uN1Qu3 » Sun Apr 29, 2007 9:45 am

Well, CDFiXER, you were right. justdave compiled a new kernel for me, and we got DMA actually working on this thing.

But, yes, there has to be a "but". The maximum supported mode is multi-word mode 2 (i've fubared my FREESCO install trying to set UDMA 2 :lol:), and it is SLOWER than using PIO. :(

Read speeds stay the same at around 4MB/sec, but write speeds dropped from 1.67MB/sec to like 600KB/sec.. So i guess it's back to good ol' PIO mode for me, at least for now.

I have plans for a better server, but it will be something built around an MMX Pentium, probably running at 200MHz, or an AMD K6 if i can find a good mobo for it. Or maybe an ULV processor like the Crusoe... i don't know. And since i'll want a hard drive larger than 137 gigs, i think i won't be running FREESCO anymore then.

But those are future plans, and i think my actual FREESCO box will be running solid for at least a couple more years.

And since it's nice, small and almost dead silent - the Fujitsu ErgoPro x451 has a slim desktop case inside which the custom Astec PSU is cooled by a quiet 92mm fan, the Pentium 133 is running fanless, and the WD 1200JB (pretty quiet drive) is mounted inside the HDD silencer the case has - everybody likes it. :wub:

Thanks for your help and continue developing this great piece of software! :happy:
User avatar
Th3_uN1Qu3
Junior Member
 
Posts: 34
Joined: Wed Mar 14, 2007 6:02 pm


Return to Packaging/Compiling/Client Information Forums

Who is online

Users browsing this forum: No registered users and 2 guests

cron