Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] dma appears off even if I turn it on
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sat Apr 12, 2008 10:43 am    Post subject: [SOLVED] dma appears off even if I turn it on Reply with quote

I installed a new kernel 2.6.24-gentoo-r3 and since then when it boots it tells me that "dma is turned off and i should turn it on". I turned it on and in the next boot I get the same error.

Code:
hdparm -cuda /dev/hda

/dev/hda:
 IO_support    =  0 (default)
16-bit)
 unmaskirq     =  0 (off)
 using_dma     =  0 (off)
 readahead     = 256 (on)

Code:
hdparm -i /dev/hda

/dev/hda:

 Model=FUJITSU MHV2060AT, FwRev=000000A0, SerialNo=NSC6T6B27DJV
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode


Where should I look in the kernel?
I use
Code:
d 1 -A 1 -m 16 -u 1 -a 64
as per handbook instructions. but the problem is that after next boot the dma is turned off. I never had such problems before. I never added hdparm at boot run level.

Code:
lspci |grep -i ide
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
carin ~ # grep -i ich /usr/src/linux/.config
CONFIG_X86_SPEEDSTEP_ICH=y
CONFIG_CRYPTO_MICHAEL_MIC=y


Thanks in advance,
Queen


Last edited by queen on Sat Apr 12, 2008 3:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sat Apr 12, 2008 11:17 am    Post subject: Reply with quote

queen,

The new way is to set your kernel up like this
Your drive will become /dev/sda, so be sure to fix grub.conf and /etc/fstab.

The old way is this which has more settings to get right.
The old IDE kernel branch will be dropped one day, so it will no longer be an option. Its some way of yet as not all the PATA drivers are have been ported to libata.

Choose one or the other - not both
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sat Apr 12, 2008 1:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

The new way is to set your kernel up like this
Your drive will become /dev/sda, so be sure to fix grub.conf and /etc/fstab.

The old way is this which has more settings to get right.
The old IDE kernel branch will be dropped one day, so it will no longer be an option. Its some way of yet as not all the PATA drivers are have been ported to libata.

Choose one or the other - not both


Thanks, but according to the first method isn't it a little bit odd to say that the hd is sata instead of ide? After all the hd is ide. I am not an expert in hardware.
Back to top
View user's profile Send private message
Koda
n00b
n00b


Joined: 02 Apr 2008
Posts: 31

PostPosted: Sat Apr 12, 2008 2:57 pm    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

The new way is to set your kernel up like this
Your drive will become /dev/sda, so be sure to fix grub.conf and /etc/fstab.

The old way is this which has more settings to get right.
The old IDE kernel branch will be dropped one day, so it will no longer be an option. Its some way of yet as not all the PATA drivers are have been ported to libata.

Choose one or the other - not both


sorry for the ot, buf after following the first guide, should we still run hdparm at boot?
thanks
bye
Koda
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sat Apr 12, 2008 3:08 pm    Post subject: Reply with quote

queen,

The reason for the /dev/sda name for IDE drives under the new method is that the kernel disk handlers are split into layers.
There are two main top level ones. IDE and SCSI.
The IDE top level layer names things /dev/hd...
The SCSI top level layer names things /dev/sd...

Under each top level layer is long list chip set specific modules. For your ICH4 chipset, there is chip set specific modiule for each high level layer.
The kernel is structured this way to make it easy to add chip set drivers without having to add the high level drive every time.

As you will be moving your drive to be controlled by the SCSI top level layer, it will get a SCSI name, even though it will use a IDE low level chip set driver.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sat Apr 12, 2008 3:09 pm    Post subject: Reply with quote

Koda wrote:
NeddySeagoon wrote:
queen,

The new way is to set your kernel up like this
Your drive will become /dev/sda, so be sure to fix grub.conf and /etc/fstab.

The old way is this which has more settings to get right.
The old IDE kernel branch will be dropped one day, so it will no longer be an option. Its some way of yet as not all the PATA drivers are have been ported to libata.

Choose one or the other - not both


sorry for the ot, buf after following the first guide, should we still run hdparm at boot?
thanks
bye
Koda


The answer is definitely no. I never used it at boot/default and the dma was on. I saw on a thread of linux questions that someone advised to add it. Now, I upgraded the kernel and missed a setting in the kernel.

I followed the guide NeddySeygon gave and now it works. Meanwhile, I selected the old setting that he advised.

Thanks Neddy. :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sat Apr 12, 2008 3:13 pm    Post subject: Reply with quote

Koda,

hdparm should never be needed at boot with a properly configured kernel.
Some of its options will cause errors if the drive is under the SCSI layer.
e.g. setting DMA on/off is not a legal thing to do. SCSI demands that DMA be on and the low level drivers all know this.
Thats why all the DMA options in the IDE kernel branch are missing in the SCSI branch. They are not needed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sat Apr 12, 2008 4:14 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Koda,


Thats why all the DMA options in the IDE kernel branch are missing in the SCSI branch. They are not needed.


In the older kernel 2.6.19 I had the dma option in scsi branch. Now in 2.6.24 it doesn't appear anymore. Now I understand why.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sat Apr 12, 2008 7:27 pm    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

The reason for the /dev/sda name for IDE drives under the new method is that the kernel disk handlers are split into layers.
There are two main top level ones. IDE and SCSI.
The IDE top level layer names things /dev/hd...
The SCSI top level layer names things /dev/sd...

Under each top level layer is long list chip set specific modules. For your ICH4 chipset, there is chip set specific modiule for each high level layer.
The kernel is structured this way to make it easy to add chip set drivers without having to add the high level drive every time.

As you will be moving your drive to be controlled by the SCSI top level layer, it will get a SCSI name, even though it will use a IDE low level chip set driver.


Makes sense. I understand better now. Thanks. ;-)
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Sun Apr 13, 2008 6:03 am    Post subject: Reply with quote

queen,

You are correct that you are not using dma, but you are using udma, which mean ultra dma.

Code:
hdparm -i /dev/hda

/dev/hda:

 Model=FUJITSU MHV2060AT, FwRev=000000A0, SerialNo=NSC6T6B27DJV
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode


Look at the "UDMA" line:
Code:
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

Your hd is using udma5 mode.

To be sure your hd speed is reasonable, do the following:
Code:
hdparm -t /dev/hda
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sun Apr 13, 2008 9:54 am    Post subject: Reply with quote

junksiu,

The output of the
Code:
hdparm -iI /dev/hda
command is misleading.
Both show flags capabilities, not what is actually in use.
Code:
hdparm /dev/hda
shows if DMA mechanism is in use.

Other than the speed, DMA and UDMA use exactly the same mechanism. To achieve UDMA speeds the hardware must support it, including the use of 80 wire IDE ribbon cables, which suitable hardware can detect.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Sun Apr 13, 2008 1:59 pm    Post subject: Reply with quote

NeddySeagoon wrote:
The output of the
Code:
hdparm -iI /dev/hda
command is misleading.
Both show flags capabilities, not what is actually in use.


But what about the line:
Code:
* signifies the current active mode


I thought that is showing what is currently used 8O
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sun Apr 13, 2008 2:54 pm    Post subject: Reply with quote

junksiu,

Thats why its misleading ... I thought that until it showed (U)DMA in use and and very poor (non DMA) hdparm -tT times.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sun Apr 13, 2008 9:33 pm    Post subject: Reply with quote

junksiu wrote:
queen,

You are correct that you are not using dma, but you are using udma, which mean ultra dma.

Code:
hdparm -i /dev/hda

/dev/hda:

 Model=FUJITSU MHV2060AT, FwRev=000000A0, SerialNo=NSC6T6B27DJV
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode


Look at the "UDMA" line:
Code:
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

Your hd is using udma5 mode.

To be sure your hd speed is reasonable, do the following:
Code:
hdparm -t /dev/hda


Neddy is right about -i misleading. From man hdparm
Code:
   
 -i    [b] Display the identification info that was obtained from the drive at boot time,[/b] if  available.
              This  is a feature of modern IDE drives, and may not be supported by older devices.  The data
              returned may or may not be current, depending on activity since booting the system.  However,
              the  current  multiple sector mode count is always shown.  For a more detailed interpretation
              of the identification info, refer to AT Attachment Interface for Disk Drives (ANSI ASC X3T9.2
              working draft, revision 4a, April 19/93).
 


Neddy, I did
Code:
hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   1436 MB in  2.00 seconds = 717.74 MB/sec
 Timing buffered disk reads:   94 MB in  3.02 seconds =  31.15 MB/sec


The numbers are reasonable? Or it can perform much better?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Sun Apr 13, 2008 9:51 pm    Post subject: Reply with quote

queen,

The Timing cached reads: 1436 MB in 2.00 seconds = 717.74 MB/sec is ok. Thats the speed at which you can move data over the IDE interface from the cache RAM on the drive.

The Timing buffered disk reads: 94 MB in 3.02 seconds = 31.15 MB/sec is the speed at which tou can get data off the drive platter.
As you used /dev/hda, its testing at the outside of the drive. 31.15MB/sec shows that DMA is in use. With PIO, you would be lucky to get 1/10 of that speed.

I cannot say if 31.15MB/sec is good for your drive. It depends on the drive rotational speed, the drive diameter, and to some extent, the age of the drive, as newer drives use smaller magnetic domains on the platter, so everything else being equal, are faster.

You have DMA in use, provided you have 80 core IDE ribbon cables, thats as fast as your hardware can go.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Sun Apr 13, 2008 11:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

The Timing cached reads: 1436 MB in 2.00 seconds = 717.74 MB/sec is ok. Thats the speed at which you can move data over the IDE interface from the cache RAM on the drive.

The Timing buffered disk reads: 94 MB in 3.02 seconds = 31.15 MB/sec is the speed at which tou can get data off the drive platter.
As you used /dev/hda, its testing at the outside of the drive. 31.15MB/sec shows that DMA is in use. With PIO, you would be lucky to get 1/10 of that speed.

I cannot say if 31.15MB/sec is good for your drive. It depends on the drive rotational speed, the drive diameter, and to some extent, the age of the drive, as newer drives use smaller magnetic domains on the platter, so everything else being equal, are faster.

You have DMA in use, provided you have 80 core IDE ribbon cables, thats as fast as your hardware can go.


The hd is fujitsu siemens 60gb 4200 rpm 2.5 inch for a laptop. It's about 2 years old. Here are more details about the hd: http://www.fujitsu.com/us/services/computing/storage/hdd/mobile/mhv2120at.html#Tab0/tab3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54801
Location: 56N 3W

PostPosted: Mon Apr 14, 2008 7:49 pm    Post subject: Reply with quote

queen,

30Mb/sec is OK for a drive like that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Mon Apr 14, 2008 10:44 pm    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

30Mb/sec is OK for a drive like that.


Thank you. 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum