Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enable 32-bit DMA transfer mode 1

Status
Not open for further replies.

rycamor

Programmer
Jun 3, 1999
1,426
US
After pawing through the rather pedantic documentation at and a couple of hours searching at google.com, I still don't understand whether I have the ability to tune my IDE drive in FreeBSD, specifically to set it up for 32 bit DMA transfer mode.

Those of you who have spent some time tuning Linux will be familiar with the "hdparm" utility which lets you get/set IDE drive parameters. I found in Linux this would often give me almost twice the perfomance out of my hard drive, especially for large executables such as X. Is there any similar utility in FreeBSD? I have enabled my kernel to accept DMA transfers, but I believe the documentation says I need to do something else to actually USE it live. Nowhere can a find a simple description of exactly how.

Does FreeBSD handle it's own tuning on this regard? I know that that is the eventual aim of the developers, but I don't know how far this goes.
 
Have you found anything there yet with the hdparm on BSD, I'm looking for the same
 
I am still a little in the dark about all this. Some things I have read seem to say that FreeBSD automatically uses DMA if it is safe, while others seem to say not.

Here is an interesting link:
Essentially, it seems you do the following:

At the booting prompt type '-c' to configure your kernel.
Enter the visual mode by typing "visual" at the prompt.
type this string into the "flags" option for your IDE controller: "a0ffa0ff".

Also:

Mount your partitions "async". You can do this by typing the the following line for already mounted file systems or editing your /etc/fstab file appropriately:
Code:
mount -u -o async /mount-point

Here is another article on FreeBSD optimization, which mentions the importance of turning on softupdates:
(read /usr/src/contrib/sys/softupdates/README ) -------------------

Current reading --
 
hi,
the default for the wd driver is "play it safe", which means PIO mode. What you probably want to do is rebuild your kernel after adding a "flags 0xa0ffa0ff" keyword to both of your IDE controllers in the config file. That will enable 32-bit I/O, DMA, and multi-block I/O for both master and slave. "man wd" for more info.
FreeBSD 4.0 has a completely rewritten IDE/ATA driver that can ask the
drive what capabilities it has, and enables the above options if the
drive says okay.
original post from $0.01
alex
 
'ola,
default install -> change config for the kernel -> install new kernel -> reboot
$0.02
alex
 
One thing I'm not sure of: the previous posts about enabling DMA don't seem to be talking about ATA-66 and ATA-100 drives, or newer ATA drives in general.

The link about mentions "man wd", but newer drives don't seem to be mentioned there. If you do "man ad", you will get a manpage describing supported ATA devices, including hard drives. It seems that for these devices, DMA is enabled by default.

Any comments/corrections? -------------------

Current reading --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top