FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my HP Pavilion 503n, I recently discovered how profound of a positive impact DMA had on my hard drive and CD/DVD drive performance. I can now burn DVDs at the advertised speed, and it works beautifully. However, the only way I know how to turn it on is by issuing the following root commands once my system has started up (the stuff after the #s is not what I put):
hdparm -d1 /dev/hda #20GB hard drive
hdparm -d1 /dev/hdb #40GB hard drive
hdparm -d1 /dev/hdc #CD reader/writer I never use
hdparm -d1 /dev/hdd #CD/DVD reader/writer
In Fedora, is there a kernel option or something that lets me enable DMA by default (preferably before the majority of the boot process, since it currently takes four minutes)?
On my HP Pavilion 503n, I recently discovered how profound of a positive impact DMA had on my hard drive and CD/DVD drive performance. I can now burn DVDs at the advertised speed, and it works beautifully. However, the only way I know how to turn it on is by issuing the following root commands once my system has started up (the stuff after the #s is not what I put):
hdparm -d1 /dev/hda #20GB hard drive
hdparm -d1 /dev/hdb #40GB hard drive
hdparm -d1 /dev/hdc #CD reader/writer I never use
hdparm -d1 /dev/hdd #CD/DVD reader/writer
In Fedora, is there a kernel option or something that lets me enable DMA by default (preferably before the majority of the boot process, since it currently takes four minutes)?
Check to see if the options below are set in your kernel if not you need a kernel with them enabled.
Code:
grep -i dma /boot/config-2.6.20-ck1-core2duo
CONFIG_ZONE_DMA32=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ISA_DMA_API=y
CONFIG_BLK_DEV_IDEDMA_PCI=y <---------------
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y <----------------
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y <------------
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y <---------
# CONFIG_PDC_ADMA is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_SOUND_DMAP is not set
# DMA Engine support
# CONFIG_DMA_ENGINE is not set
# DMA Clients
# DMA Devices
Yes, all of those items are enabled in my /boot/config-2.6.20-1.2933.fc6 file. I'm wondering if I need a kernel option or something to keep it in control. I'm guessing the system could be starting with DMA enabled, but it gets turned off sometime during the boot process. I noticed that DMA gets turned off when I do things like fdisk /dev/hda (without even writing to it). I wonder if DMA is getting turned off by udev or by the remount to read/write process.
Whatever the case, my GRUB kernel boot commands are:
Yes, all of those items are enabled in my /boot/config-2.6.20-1.2933.fc6 file. I'm wondering if I need a kernel option or something to keep it in control. I'm guessing the system could be starting with DMA enabled, but it gets turned off sometime during the boot process. I noticed that DMA gets turned off when I do things like fdisk /dev/hda (without even writing to it). I wonder if DMA is getting turned off by udev or by the remount to read/write process.
Whatever the case, my GRUB kernel boot commands are:
(The ide0=dma was something I tried to enable DMA, but it seemed to have no effect.)
There in the kernel as a =y not =m so that they are built into the kernel and have no choice but to be available? If so one thing to try would be to make CONFIG_BLK_DEV_IDEDMA_FORCED=y to force the use of DMA and to make sure that the chipset for your motherboard is set to =y.
I managed to work around it by sticking the DMA-enabling commands in my /etc/rc.sysinit after all the file systems had been mounted (putting it at the beginning allowed udev or something to reverse it). I timed my system's total boot time from computer startup to KDE loading with and without DMA. I got 5 minutes without DMA, 3 minutes with DMA.
I did notice that my CD and DVD drives (/dev/hdc and /dev/hdd) had DMA enabled by default in both cases.
For you Googlers out there, I'll post what I did here:
(This is a segment of /etc/rc.sysinit)
Original:
Code:
...
# Check to see if a full relabel is needed
if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then
if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel ; then
relabel_selinux
fi
else
if [ -d /etc/selinux -a "$READONLY" != "yes" ]; then
[ -f /.autorelabel ] || touch /.autorelabel
fi
fi
# Start the graphical boot, if necessary and not done yet.
if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
( . /etc/sysconfig/i18n 2>/dev/null ; /usr/bin/rhgb )
RHGB_STARTED=1
fi
...
Modified:
Code:
...
# Check to see if a full relabel is needed
if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then
if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel ; then
relabel_selinux
fi
else
if [ -d /etc/selinux -a "$READONLY" != "yes" ]; then
[ -f /.autorelabel ] || touch /.autorelabel
fi
fi
#Enable DMA
echo "Enabling DMA..."
/sbin/hdparm -d1 /dev/hda
/sbin/hdparm -d1 /dev/hdb
/sbin/hdparm -d1 /dev/hdc
/sbin/hdparm -d1 /dev/hdd
# Start the graphical boot, if necessary and not done yet.
if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
( . /etc/sysconfig/i18n 2>/dev/null ; /usr/bin/rhgb )
RHGB_STARTED=1
fi
...
I just added /sbin/hdparm commands, which enable DMA on the drives above. This may be slightly different for different people, depending on their configuration. If this does not work for other people, then read the second post in this thread
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.