View previous topic :: View next topic |
Author |
Message |
sniggit Apprentice
Joined: 31 Aug 2003 Posts: 187 Location: n00bcity
|
Posted: Fri Sep 05, 2003 11:16 pm Post subject: How to turn on dma? |
|
|
When booting with lilo, i get a box say dma on my HD is not turned on and that this could really slow down fsck.
Obviously my question is: How do i turn on DMA?
And follow up questions if anyone bothers to answer them:
What is dma and what does it do?
What is fsck and what does it do? _________________ Let the money shine! |
|
Back to top |
|
|
aja l33t
Joined: 26 Aug 2002 Posts: 705 Location: Edmonton, Canada
|
Posted: Sat Sep 06, 2003 12:08 am Post subject: |
|
|
For how to turn on dma - I believe it is also mentioned in the install guide. As for what dma (direct memory access) and fsck (filesystem check) are, that sounds like a job for Google. |
|
Back to top |
|
|
pfft n00b
Joined: 04 Sep 2003 Posts: 22 Location: nowhere
|
Posted: Sat Sep 06, 2003 9:23 am Post subject: ;=) |
|
|
hdparm -k 1 -d 1 /dev/hdaX
for primary master hard disc |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sat Sep 06, 2003 11:54 am Post subject: |
|
|
hdparm -k 1 -d 1 /dev/hdd
/dev/hdd:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
setting keep_settings to 1 (on)
using_dma = 0 (off)
keepsettings = 1 (on)
what should i do now? |
|
Back to top |
|
|
augustus Apprentice
Joined: 28 Aug 2003 Posts: 173 Location: Italy
|
Posted: Sat Sep 06, 2003 11:57 am Post subject: |
|
|
Have you tried hdparm -k 1 -d 1 /dev/hdd as root?
If no try to give hdparm -k 1 -d 1 /dev/hdd as root.
If yes you can try to add
options ide-cd dma=1
in your
/etc/modules.conf |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sat Sep 06, 2003 12:08 pm Post subject: |
|
|
ok, i added it at the end of the file...and what now? |
|
Back to top |
|
|
luugin n00b
Joined: 10 May 2003 Posts: 69
|
Posted: Sat Sep 06, 2003 12:23 pm Post subject: |
|
|
This should enable dma when you boot:
Code: | rc-update add hdparm default |
|
|
Back to top |
|
|
augustus Apprentice
Joined: 28 Aug 2003 Posts: 173 Location: Italy
|
Posted: Sat Sep 06, 2003 12:23 pm Post subject: |
|
|
smokecd wrote: | ok, i added it at the end of the file...and what now? |
Now you must reboot your machine... options ide-cd dma=1 should activate dma at boot of linux.
If the problem persists you can try to recompile the kernel: REMEMBER to activate "Use PCI DMA by default when available" and the support for your chipset |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sat Sep 06, 2003 12:44 pm Post subject: |
|
|
the-matrix wrote: | smokecd wrote: | ok, i added it at the end of the file...and what now? |
Now you must reboot your machine... options ide-cd dma=1 should activate dma at boot of linux.
If the problem persists you can try to recompile the kernel: REMEMBER to activate "Use PCI DMA by default when available" and the support for your chipset |
the support for my chipset is already enabled, but i don't find "Use PCI DMA by default when available" |
|
Back to top |
|
|
augustus Apprentice
Joined: 28 Aug 2003 Posts: 173 Location: Italy
|
Posted: Sat Sep 06, 2003 1:19 pm Post subject: |
|
|
ATA/IDE/MFM/RLL support --> IDE, ATA and ATAPI Block devices --> Use pci dma by default when avaible
on kernel 2.4.21
here you should add also Generic PCI bus-master dma support
(ATA/IDE/MFM/RLL support --> IDE, ATA and ATAPI Block devices --> Generic PCI bus-master dma support) |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sat Sep 06, 2003 2:55 pm Post subject: |
|
|
ok, dma is enabled in bios and in the kernel but it still doesn't work. |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sun Sep 07, 2003 8:47 pm Post subject: |
|
|
pls help me |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Sun Sep 07, 2003 9:01 pm Post subject: |
|
|
Which kernel you use? I have used gentoo-sources and dma is working, but iptables didnt work so i switch to grsec-sources and now iptables work but dma dont.
Now i have the same problam as you
But at least firewall is working |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sun Sep 07, 2003 9:32 pm Post subject: |
|
|
i have got the vanilla sources |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Sun Sep 07, 2003 9:45 pm Post subject: |
|
|
Well grsec-sources are vanilla-sources with the grsecurity patch.
Maybe is something in vanilla-sources which turn dma off ? |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Sun Sep 07, 2003 10:09 pm Post subject: |
|
|
dunno, my hdd works in udma6 mode |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Sun Sep 07, 2003 10:14 pm Post subject: |
|
|
mine hdd too.
I do all what is here but still no dma |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Sun Sep 07, 2003 10:23 pm Post subject: |
|
|
It may be that his DMA is actually enabled but AFTER the "box" pops up during the boot. Could someone tell him how to check whether DMA is working after the machine has booted up? |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Sun Sep 07, 2003 11:04 pm Post subject: |
|
|
None of you guys have mentioned what IDE chipset you are using, and this is the key to getting DMA to work.
For example, on the machine I am using now :
Code: | # lspci
...
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
... |
I have a VIA IDE controller, which I have enabled in the kernel :
Code: | # make menuconfig
ATA/IDE/MFM/RLL support --->
IDE, ATA and ATAPI Block devices --->
[*] Use PCI DMA by default when available
[*] VIA82CXXX chipset support |
This way my machine boots with DMA enabled without even needing to use hdparm. |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Mon Sep 08, 2003 8:17 am Post subject: |
|
|
TNX cyrilic
Adding IDE chipset to kernel turns dma on
btw: i have a VIA IDE controller too |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Mon Sep 08, 2003 12:24 pm Post subject: |
|
|
Do this:
hdparm /dev/hdX
and this:
hdparm -tT /dev/hdX
and post the result |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Mon Sep 08, 2003 2:21 pm Post subject: |
|
|
root@Smoke:/home/felix$hdparm /dev/hdd
/dev/hdd:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 1 (on)
readonly = 0 (off)
readahead = 8 (on)
geometry = 238216/16/63, sectors = 240121728, start = 0
root@Smoke:/home/felix$hdparm -tT /dev/hdd
/dev/hdd:
Timing buffer-cache reads: 1476 MB in 2.00 seconds = 738.00 MB/sec
Timing buffered disk reads: 20 MB in 3.04 seconds = 6.58 MB/sec
how can i find out which IDE chipset i use? i don't think that it's via, 'cause I've got a nforce2 chipset on my mainboard |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Mon Sep 08, 2003 2:37 pm Post subject: |
|
|
Type: lspci
to find out wich ide controller you have.
My is:
root@gentoobox /home/ank # lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
00:09.0 USB Controller: VIA Technologies, Inc. USB (rev 50)
00:09.1 USB Controller: VIA Technologies, Inc. USB (rev 50)
00:09.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8233A ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:11.2 USB Controller: VIA Technologies, Inc. USB (rev 23)
00:11.3 USB Controller: VIA Technologies, Inc. USB (rev 23)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R200 QL [Radeon 8500 LE]
root@gentoobox /home/ank # |
|
Back to top |
|
|
smokecd n00b
Joined: 06 Sep 2003 Posts: 42 Location: Germany
|
Posted: Mon Sep 08, 2003 2:40 pm Post subject: |
|
|
bash: lspci: command not found |
|
Back to top |
|
|
ank Apprentice
Joined: 06 Aug 2003 Posts: 185 Location: Maribor, Slovenia
|
Posted: Mon Sep 08, 2003 2:42 pm Post subject: |
|
|
You must type this as root. |
|
Back to top |
|
|
|