# 100% CPU usage while reading data from HDD [nforce2 chipset]

## sh.id.lv

I have problem with reading data from my HDD, becouse there are 100% CPU usage 

when i read data from HDD. It makes Moz.FireFox loading up to 8 secs, KDE - 

10 secs. I have DMA enabled and tried lots of modes. Kernel -  

gentoo-dev-sources 2.6.5. I also tried lots of kernels... and there anythink is OK with /etc/hostname ...

My PC:

*CPU: AMD Barton 2500+ @ 3200+;

*RAM: Kingston 512MB DDR400 CL2.5 (dual);

*MB: Epox 8RDA3I nForce2 Ultra 400 (!!!);

*HDD: Maxtor DiamondMax +9 80GB 7200rpm 2MB cache;

*VGA: Palit Daytona GeForce FX 5200 128MB 128bit; 

Please help!

 *hdparm -tT /dev/hda wrote:*   

> /dev/hda:
> 
>  Timing buffer-cache reads:   1620 MB in  2.00 seconds = 809.31 MB/sec
> 
>  Timing buffered disk reads:  172 MB in  3.01 seconds =  57.09 MB/sec

 

```
USE="-samba gd libgd gd-external gphoto2 xml X -gtk opengl avi gpm mpeg xv videos 3dnow mmx jpeg usb xmms quicktime cups sse postgres gtk2 -gnome2 -gnome kde -ipv6 -cdr mysql truetype -doc qt xft qt-mt oss pic -alsa chroot"

CHOST="i686-pc-linux-gnu"

CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -ffast-math -funroll-loops"

CXXFLAGS="${CFLAGS}"

ACCEPT_KEYWORDS="x86"

MAKEOPTS="-j2"

```

```
# hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media

        Model Number:       Maxtor 6Y080L0

        Serial Number:      Y2P655AE

        Firmware Revision:  YAR41BW0

Standards:

        Supported: 7 6 5 4

        Likely used: 7

Configuration:

        Logical         max     current

        cylinders       16383   16383

        heads           16      16

        sectors/track   63      63

        --

        CHS current addressable sectors:   16514064

        LBA    user addressable sectors:  160086528

        device size with M = 1024*1024:       78167 MBytes

        device size with M = 1000*1000:       81964 MBytes (81 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        Queue depth: 1

        Standby timer values: spec'd by Standard, no device specific minimum

        R/W multiple sector transfer: Max = 16  Current = 16

        Advanced power management level: unknown setting (0x0000)

        Recommended acoustic management value: 192, current value: 192

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    NOP cmd

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

                SMART feature set

           *    FLUSH CACHE EXT command

           *    Mandatory FLUSH CACHE command

           *    Device Configuration Overlay feature set

           *    Automatic Acoustic Management feature set

                SET MAX security extension

                Advanced Power Management feature set

           *    DOWNLOAD MICROCODE cmd

           *    SMART self-test

           *    SMART error logging

Security:

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

```

```
# dmesg

Linux version 2.6.5-shal3r-r2 (root@sh.id.lv) (gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)) #2 Wed Apr 21 12:01:16 EEST 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)

 BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)

 BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

511MB LOWMEM available.

On node 0 totalpages: 131056

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126960 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 Nvidia                                    ) @ 0x000f7490

ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3000

ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3040

ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff7b80

ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000

Built 1 zonelists

Kernel command line: auto BOOT_IMAGE=Gentoo-2.6.5-r2 ro root=301 elevator=cfq ide0=ata66

ide_setup: ide0=ata66

Initializing CPU#0

PID hash table entries: 2048 (order 11: 16384 bytes)

Detected 1840.089 MHz processor.

Using tsc for high-res timesource

Console: colour dummy device 80x25

Memory: 515428k/524224k available (2070k kernel code, 8036k reserved, 449k data, 144k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3629.05 BogoMIPS

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU:     After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU:     After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 512K (64 bytes/line)

CPU:     After all inits, caps: 0383fbff c1c3fbff 00000000 00000020

CPU: AMD Athlon(tm) XP 2500+ stepping 00

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb500, last bus=2

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20040326

ACPI: IRQ9 SCI: Edge set to Level Trigger.

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]

ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 5 6 7 10 11 *12 14 15)

ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 5 6 7 10 11 *12 14 15)

ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LAPU] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LUB2] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LFIR] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [L3CM] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [APC1] (IRQs *16)

ACPI: PCI Interrupt Link [APC2] (IRQs 17)

ACPI: PCI Interrupt Link [APC3] (IRQs 18)

ACPI: PCI Interrupt Link [APC4] (IRQs *19)

ACPI: PCI Interrupt Link [APC5] (IRQs 16)

ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCI] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCS] (IRQs *23)

ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [AP3C] (IRQs 20 21 22)

ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22)

SCSI subsystem initialized

drivers/usb/core/usb.c: registered new driver usbfs

drivers/usb/core/usb.c: registered new driver hub

ACPI: PCI Interrupt Link [LSMB] enabled at IRQ 11

ACPI: PCI Interrupt Link [LUBA] enabled at IRQ 5

ACPI: PCI Interrupt Link [LUBB] enabled at IRQ 12

ACPI: PCI Interrupt Link [LUB2] enabled at IRQ 11

ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 11

ACPI: PCI Interrupt Link [LNK1] enabled at IRQ 5

ACPI: PCI Interrupt Link [LNK4] enabled at IRQ 12

PCI: Using ACPI for IRQ routing

PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'

vesafb: framebuffer at 0xe0000000, mapped to 0xe0808000, size 16384k

vesafb: mode is 1024x768x16, linelength=2048, pages=1

vesafb: protected mode interface info at c000:dfe0

vesafb: scrolling: redraw

vesafb: directcolor: size=0:5:6:5, shift=0:11:5:0

fb0: VESA VGA frame buffer device

VFS: Disk quotas dquot_6.5.1

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

ACPI: Power Button (FF) [PWRF]

ACPI: Fan [FAN] (on)

ACPI: Processor [CPU0] (supports C1)

ACPI: Thermal Zone [THRM] (32 C)

mice: PS/2 mouse device common for all mice

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

input: AT Translated Set 2 keyboard on isa0060/serio0

Console: switching to colour frame buffer device 128x48

Real Time Clock Driver v1.12

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected NVIDIA nForce2 chipset

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: AGP aperture is 64M @ 0xe8000000

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

NFORCE2: IDE controller at PCI slot 0000:00:09.0

NFORCE2: chipset revision 162

NFORCE2: not 100% native mode: will probe irqs later

NFORCE2: BIOS didn't set cable bits correctly. Enabling workaround.

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

hda: Maxtor 6Y080L0, ATA DISK drive

Using cfq io scheduler

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: CD-540E, ATAPI CD/DVD-ROM drive

hdd: LITE-ON LTR-52327S, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(133)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 >

ehci_hcd 0000:00:02.2: EHCI Host Controller

PCI: Setting latency timer of device 0000:00:02.2 to 64

ehci_hcd 0000:00:02.2: irq 11, pci mem e1850000

ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 1

PCI: cache line size of 64 is not supported by device 0000:00:02.2

ehci_hcd 0000:00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd: block sizes: ed 64 td 64

ohci_hcd 0000:00:02.0: OHCI Host Controller

PCI: Setting latency timer of device 0000:00:02.0 to 64

ohci_hcd 0000:00:02.0: irq 5, pci mem e1852000

ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 3 ports detected

ohci_hcd 0000:00:02.1: OHCI Host Controller

PCI: Setting latency timer of device 0000:00:02.1 to 64

ohci_hcd 0000:00:02.1: irq 12, pci mem e1854000

ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 3 ports detected

USB Universal Host Controller Interface driver v2.2

drivers/usb/core/usb.c: registered new driver audio

drivers/usb/class/audio.c: v1.0.0:USB Audio Class driver

drivers/usb/core/usb.c: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

drivers/usb/core/usb.c: registered new driver usb-storage

USB Mass Storage support registered.

i2c /dev entries driver

i2c_adapter i2c-0: nForce2 SMBus adapter at 0x5000

i2c_adapter i2c-1: nForce2 SMBus adapter at 0x5100

usb 3-1: new low speed USB device using address 2

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 65536)

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI: (supports S0 S1 S4 S5)

found reiserfs format "3.6" with standard journal

Reiserfs journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

reiserfs: checking transaction log (hda1) for (hda1)

Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Freeing unused kernel memory: 144k freed

hdc: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 52X CD-ROM CD-R/RW CD-MRW drive, 2048kB Cache, UDMA(33)

nvnet: module license 'NVIDIA' taints kernel.

PCI: Setting latency timer of device 0000:00:04.0 to 64

nvnet: selecting duplex setting as auto duplex mode.

nvnet: selecting speed settings as auto-negotiation.

nvnet: Optimizing driver for CPU

nvidia: no version magic, tainting kernel.

nvidia: module license 'NVIDIA' taints kernel.

0: nvidia: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-5336  Wed Jan 14 18:29:26 PST 2004

input: Microsoft Basic Optical Mouse on usb-0000:00:02.1-1

drivers/usb/core/usb.c: registered new driver usbmouse

drivers/usb/input/usbmouse.c: v1.6:USB HID Boot Protocol mouse driver

found reiserfs format "3.6" with standard journal

Reiserfs journal params: device hda5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

reiserfs: checking transaction log (hda5) for (hda5)

Using r5 hash to sort names

found reiserfs format "3.6" with standard journal

Reiserfs journal params: device hda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

reiserfs: checking transaction log (hda6) for (hda6)

Using r5 hash to sort names

kjournald starting.  Commit interval 5 seconds

EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

EXT3 FS on hda8, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

es1371: version v0.32 time 16:22:47 Apr 12 2004

es1371: found chip, vendor id 0x1274 device id 0x5880 revision 0x02

es1371: found es1371 rev 2 at io 0xd000 irq 5 joystick 0x0

ac97_codec: AC97  codec, id: TRA35 (TriTech TR A5)

process `named' is using obsolete setsockopt SO_BSDCOMPAT

parport0: PC-style at 0x378 [PCSPP(,...)]

parport0: irq 7 detected

lp0: using parport0 (polling).

Adding 262136k swap on /swapfile.  Priority:-1 extents:91

inserting floppy driver for 2.6.5-shal3r-r2

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:02:00.0 into 8x mode

atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).

atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.

atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).

atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.

0: nvidia: trying to map 0xe7b15000 to kernel space, but we're in an interrupt or holding a spinlock

```

----------

## sh.id.lv

I checked my CPU usage when reading from HDD with KNOPPIX-LiveCD and there was maximum 30% CPU usage...

----------

## PrakashP

You could try changing the io scheduler to as or deadline.

----------

## sh.id.lv

I already tried it... no effect, it makes my system slower   :Sad: 

----------

## PrakashP

Strange, I have a nforce2, as well, but I use the onboard silicon image controller and have <34% CPU usage when doing cat /dev/sda>/dev/null with the hd having >60mb/sec throughoutput. But even when I sometime have hd on the nforce ide, CPU usage is ok. I using latest 2.6.6-rc3-love3.

----------

## PrakashP

Oh, just a thought: When do you have 100% cpu load? Also doing hdparm -t? Your start-up times could be normal due to the -O3 compiler flag. Your binaries are just too large...

----------

## sh.id.lv

OK, i will try love sources and -O2 ...

cat /dev/hda > /dev/null also makes 100% cpu usage... same with hdparm -tT /dev/hda

----------

## sindre

I really doubt -O2 will help anything.

----------

## PrakashP

Yes, after reading even hdparm and cat gives you 100%, -O2 won't help against this (though could reduce load times as such with big progs).

----------

## sh.id.lv

Why only i have this problem? Same problem on identical PC..

----------

## PrakashP

Well, try other kernel version, glibc, gcc whatever. I am on ~x86 using gcc3.4 without major probs.

----------

## jonnevers

hi,

You said you tried a bunch of kernels, but did you correctly include all of the nforce2 options? for nforce2 the best choice is mm-sources (or love-sources). I believe most of the nforce2 fixes that were in love-sources have been moved into the main mm branch!

there is an option in menuconfig:

under device drivers -> ATA... -> <*>         AMD and nVidia IDE support

this allows PIO,DMA, and UDMA to work on nforce chipsets.

as for loading times, mileage varies but generally you'll get longer load times the first time an app is instantiate (as none of it is already in memory)

-Jon

----------

## PrakashP

BTW, have you deactivated the generic dma driver? Perhaps that is interfering with you? Make sure you only have the nforce ide compiled in.

----------

## sh.id.lv

I configured fresh 2.6.5-mm6 kernel, but nvidia VGA drivers dont work... And there is 100% cpu usage anyway...

----------

## PrakashP

Have you read my previous post? For nvidia driver, you need various patches reverted (4kb stack, modules modpost). Then better try love-sources.

----------

## sh.id.lv

Love sources dont love me  :Smile:  It doesnt help! I maked fresh config, set nvidia/amd ide, dma, etc...

----------

## sh.id.lv

I hear somethink about different nforce-ide modes. One is MCP, which loads CPU, but dont do it... maybe someone know somethink more about this?

----------

## Peacefaker

Well my EPoX 8RDA3+ manages 44MB/sec @ 6-10% CPU on IDE and 60MB/sec @ 12-16% CPU on SATA

----------

## tactless

Silly question, but a clarification perhaps: Have you enabled AMD and nVidia IDE support in the kernel? (Under ATA/ATAPI/ETC/ETC support)

----------

## sh.id.lv

Yes, i have it!

```

 <*> ATA/ATAPI/MFM/RLL support                                       

 <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support           

 ---     Please see Documentation/ide.txt for help/info on IDE drives

 [ ]     Use old disk-only driver on primary interface               

 <*>     Include IDE/ATA-2 DISK support                              

 [*]       Use multi-mode by default                                 

 [ ]       Auto-Geometry Resizing support                            

 <*>     Include IDE/ATAPI CDROM support                             

 < >     Include IDE/ATAPI TAPE support (EXPERIMENTAL)               

 < >     Include IDE/ATAPI FLOPPY support                            

 < >     SCSI emulation support                                      

 [ ]     IDE Taskfile Access                                         

 [*]     IDE Taskfile IO (EXPERIMENTAL)                              

 ---     IDE chipset support/bugfixes                                

 < >     generic/default IDE chipset support                         

 [ ]     CMD640 chipset bugfix/support                               

 [*]     PCI IDE chipset support                                     

 [ ]       Sharing PCI IDE interrupts support                        

 [ ]       Boot off-board chipsets first support                     

 [ ]       Generic PCI IDE Chipset Support                           

 < >       OPTi 82C621 chipset enhanced support (EXPERIMENTAL)       

 < >       RZ1000 chipset bugfix/support                             

 [*]       Generic PCI bus-master DMA support                        

 [ ]         Force enable legacy 2.0.X HOSTS to use DMA              

 [*]         Use PCI DMA by default when available                   

 [ ]           Enable DMA only for disks                             

 < >         AEC62XX chipset support                                 

 < >         ALI M15x3 chipset support                               

 <*>         AMD and nVidia IDE support                              

 < >         ATI IXP chipset IDE support                             

 < >         CMD64{3|6|8|9} chipset support                          

 < >         Compaq Triflex IDE support                              

 < >         CY82C693 chipset support                                

 < >         Cyrix CS5510/20 MediaGX chipset support (VERY EXPERIMENTAL)

 < >         Cyrix/National Semiconductor CS5530 MediaGX chipset support

 < >         HPT34X chipset support                                  

 < >         HPT36X/37X chipset support                              

 < >         National SCx200 chipset support                         

 < >         Intel PIIXn chipsets support                            

 < >         NS87415 chipset support                                 

 < >         PROMISE PDC202{46|62|65|67} support                     

 < >         PROMISE PDC202{68|69|70|71|75|76|77} support            

 < >         ServerWorks OSB4/CSB5/CSB6 chipsets support             

 < >         Silicon Image chipset support                           

 < >         SiS5513 chipset support                                 

 < >         SLC90E66 chipset support                                

 < >         Tekram TRM290 chipset support                           

 < >         VIA82CXXX chipset support                               

 [ ]     IGNORE word93 Validation BITS                               

```

----------

## sh.id.lv

Somebody, please reply  :Smile: 

----------

## tactless

I'm pretty sure you have everyone stumped...

----------

## PrakashP

Perhaps you should try to boot up a live cd and look whether you get 100%. Or try a minimal system w/o services and mostly kernel only. So you know whether it is a kernel problem or something else.

Or if possible try putting the maxtor to another controller on the same machine.

----------

## davidl

I've built three nForce machines, and apart from two everything worked great - including APIC. Amazing, although APIC is a big issue with nForce boards. ACPI seems to be great, but APIC is the big nForce problem - switch it off in the kernel. Don't switch it off in the BIOS as Windows will need it.

This certainly has me stumped.

You need to do various things to get the nVidia drivers working and they are well documented.

I would try wiping your entire system, filesystems, everything, and starting from scratch just to make sure. Try the APIC thing above in your kernel.

----------

## PrakashP

Nope, with newest mm kernel, APIc is no more a issue, as "the" fix has been included.

----------

## davidl

 *PrakashKC wrote:*   

> Nope, with newest mm kernel, APIc is no more a issue, as "the" fix has been included.

 

Well that's good, but it depends on the motherboard a lot of the time. APIC is not 100%.

----------

## tactless

By the way, as far as I can see, APIC is something used for SMP. Do we single-processor people even need it?

----------

## PrakashP

@daviddl

If you are speaking of nforce2, you are not up-to-date. Believe me, it has recently been fixed. No more problems. (For correct timer irq routing, pass acpi_skip_timer_override, I guess this will be automated soon.)

----------

## PrakashP

@tactless

Take a close look and compare with yours. Then you should find the answer on your own (if you don't use APIC).

```

cat /proc/interrupts

           CPU0

  0:     524898    IO-APIC-edge  timer

  1:       1927    IO-APIC-edge  i8042

  8:          3    IO-APIC-edge  rtc

  9:          0   IO-APIC-level  acpi

 12:      26381    IO-APIC-edge  i8042

 14:         23    IO-APIC-edge  ide0

 15:         29    IO-APIC-edge  ide1

 18:       8891   IO-APIC-level  libata

 20:        498   IO-APIC-level  NVidia nForce2, ehci_hcd

 21:          0   IO-APIC-level  ohci_hcd

 22:      52828   IO-APIC-level  ohci_hcd, eth0

NMI:          0

LOC:     524841

ERR:          0

MIS:          0

```

----------

## _Nomad_

Well... I'm experiencing this very same issue... cpu goes to 100% when using any of my hdd's... very odd...

----------

## PrakashP

Hmm, perhaps you /if you have an nforce2, as well) and the thread starter should pass me your emails, you I can send you my kernel config. Though our configs differ, it should at least work for the ide stuff...

----------

## _Nomad_

you can send it to nomadnr1 at hotmail.com. I'm quite eager to get this resolved... thanks...

----------

## PrakashP

Mail is out, please report back.  :Smile: 

----------

## _Nomad_

nope... doesn't work... I already had all the relevant options enabled to start with. Although I noticed that you had a few differences in you .config none of it seemed to make a difference on my system...

I'm going to try a bios upgrade now... just noticed there's a new version available... Hopefully that will do some good  :Rolling Eyes: 

----------

## _Nomad_

Ok... I take it noone is closer to a solution on this matter. 

Could this be something related to the brand of hdd's that's being used. I read somewhere that there's been issues with western digital and nforce2. I'm using 2 seagate 160 gig hdd's (I know, I'm a sucker for storage  :Laughing:  ) anyway, what are you guys using. 

Ohh... and also I've got an A7N8X-X

EDIT: the bios upgrade doesn't do shit...

----------

## PrakashP

Starnge enough two days ago, copying from my DVD-ROm I had 100% CPU, as well, but after a reboot everything was ok, again. SOmething seems flaky...

I have a Samsung 160GB 8MB 7200rpm PATA connected via converter to onboard SiI3112A.

----------

## Klin'Targ

I have been suffering from this problem for a while, but didn't realize how bad it really was.

I timed my disk with a cp of a 350 MB file, and got 6 MB/sec  :Shocked: 

I am running on a Toshiba Satellite 1415-S173.

The disk is a laptop disk, so it is slow, but it shouldn't be THAT slow.

I also get 100% CPU usage when doing that copy. DMA is enabled.

My system is using an intel board with a P4 based celeron 1.8 Ghz.

Any solutions?

EDIT: Well its 6 MB/s for a duplicate op, 13MB/s when just reading (cat file > /dev/null)

EDIT 2: Upon further investigation, this IS normal for my laptop's HD. It does still show 100% iowait for the cpu during this time. I have gotten conflicted reports as to if iowait is idle time or used time for the cpu.

I DO have ~8 seconds for first load of firefox and a long load of KDE as well (~20 seconds).

----------

## Klin'Targ

Well I tested my other system now, and it shows the same 100% wa when copying files. I did some of my own tests and now believe that in top, the "wa" just means waiting for data, and is the same as the processor being idle. I still need to check if this effects power management at all on my laptop, but otherwise I believe this to be normal behavior.

Can anyone give a counterexample, i.e. a situation where they are doing a large file operation and not getting 100% wa on a 2.6 kernel?

This time to test, I did a "du -sh /"

----------

## sh.id.lv

Maybe anyone finnaly found how to fix this?

----------

## PrakashP

I also get very high wa in top when doing cat /dev/sda >/dev/null, but gkrellm2 show 10-20% CPU usage, so I think this is normal.

----------

## richard77

I've an epox 8RDA (nforce2), with a 120GB Maxtor (6Y120L0).

When i use hdd (cat large_file > /dev/null) top reports:

top - 13:14:19 up 17:49,  8 users,  load average: 1.75, 1.71, 1.86

Tasks: 106 total,   2 running,  87 sleeping,  16 stopped,   1 zombie

Cpu(s):  6.6% us,  9.6% sy,  0.0% ni,  0.0% id, 80.8% wa, 3.0% hi,  0.0% si

I was not able to determine the meaning of the variuos field 

(my guess us=user, sy=system, ni=?, id=idle, wa=waiting (for what), hi=?, si?))

I've alsa made a test in this way:

1) time cat large_file > /dev/null :  72 secs 

then

2) time mplayer an_avi_file_copied_in_dev_shm_so_i_dont_access_disk -benchmark -nosound: 73 secs 

1+2 at the same time: about 95 secs (+30%).

So i think that reading from disk does not use 100% cpu, but i am aware this is not a definitive  test.

Greetings,

federico

EDIT: my hdparm -tT 

/dev/hda:

 Timing buffer-cache reads:   396 MB in  2.01 seconds = 197.14 MB/sec

 Timing buffered disk reads:  104 MB in  3.03 seconds =  34.32 MB/sec

----------

## sgaap

mm, my problems seems the same, no problems with 2.6.3 (ck sources) but a very high load when using hd or cd/dvd devices 

also with an nforce2 400 ultra (nforce kernel ide drivers, dma on)

kernel 2.6.7-rc2-love2

so it feels to be a bug in those drivers (didnt had any problems with ck-sources and an older kernel

```

bash-2.05a# hdparm -Tt /dev/hda

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.37 seconds =346.94 MB/sec

 Timing buffered disk reads:  64 MB in  1.60 seconds = 39.88 MB/sec

```

```

bash-2.05a# hdparm /dev/hda

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 65535/16/63, sectors = 156355584, start = 0

```

```

bash-2.05a# hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media

        Model Number:       MAXTOR 6L080J4

        Serial Number:      664213710282

        Firmware Revision:  A93.0500

Standards:

        Used: ATA/ATAPI-5 T13 1321D revision 1

        Supported: 5 4 3 2 & some of 6

Configuration:

        Logical         max     current

        cylinders       16383   16383

        heads           16      16

        sectors/track   63      63

        --

        CHS current addressable sectors:   16514064

        LBA    user addressable sectors:  156355584

        device size with M = 1024*1024:       76345 MBytes

        device size with M = 1000*1000:       80054 MBytes (80 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        bytes avail on r/w long: 4      Queue depth: 1

        Standby timer values: spec'd by Vendor, no device specific minimum

        R/W multiple sector transfer: Max = 16  Current = 16

        Recommended acoustic management value: 128, current value: 254

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

                SMART feature set

           *    Mandatory FLUSH CACHE command

           *    Device Configuration Overlay feature set

           *    Automatic Acoustic Management feature set

                SET MAX security extension

           *    DOWNLOAD MICROCODE cmd

           *    SMART self-test

           *    SMART error logging

Security:

        Master password revision code = 65534

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

        40min for SECURITY ERASE UNIT.

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

```

nothing really strange to see

----------

## LAsk

I'm having this problem on my laptop too. As soon as you read or write to the disk CPU usage goes up to 100% and everything else gets really slow. As far as I can see it isn't really a matter of how fast the disk is, but what makes it use so much CPU. I think this problem didn't exist with the 2.4 kernel, not sure about that though.

I've tried things like renice and stuff like that, but it must be something else... Hope someone could find it.

----------

## seventhguardian

Hi there!

It MUST be a dma issue. I guess all of you tried nForce ide chipset (?), but couldn't it be that your nForce mobo uses a different ide chipset?

Try to enable ALL chipsets on the kernel, and see if this works. If it does, try removing the chipsets one by one  :Smile: 

I had this problem, yet my mobo is an asus. I had the intel ide chipset support enabled, but it needed to be the sis chipset..  :Rolling Eyes: 

----------

## sh.id.lv

seventhguardian, i compiled fresh linux-love-sources-2.6.7-love5 with support for all IDE chipsets, but no result...

----------

## seventhguardian

hummmm..........

you got me puzzled...........

Do you have a warning at boot time telling you that dma is disabled and that the routine filesystem check will take a longer time? I had that warning (i'm using reiser fs.. I think ext fs doesn't give that warning though..), so it might help clearing things out...

To be honest I realy don't know what you should do.. Have you tried gentoo kernel? or other?

------

Well, you said you got other boxes working with nforce boards. Are the boards the same? If so, or almost the same, try putting all your current hardware (cpu, disks, ram, video card, etc) on one of the other mobos, and see if the problem goes away:

>> If it does work right, the problem is definitely the mobo.. See if you can exchange it  for a new one under its guarantee..

>> If the problem is still there, then the problem is definitely on the system or other hardware (maybe conflicts on resources or so...).

Your problem might be a bug on the driver, so we should first check out a few things.... Im puzzled though...

----------

## sh.id.lv

 *seventhguardian wrote:*   

> hummmm..........
> 
> you got me puzzled...........
> 
> Do you have a warning at boot time telling you that dma is disabled and that the routine filesystem check will take a longer time? I had that warning (i'm using reiser fs.. I think ext fs doesn't give that warning though..), so it might help clearing things out...
> ...

 

I dont have anyway warnings about DMA...

I Tried a lots of kernels...

I have identical PC and there is same problem.

I think it's LINUX BUG  :Sad:  ... life sucks...

----------

## blaster999

Well, I have the issue too. I have a chaintech mobo, two HDDs - Samsung and WD, and large disk IO causes 100% cpu usage  :Sad: 

----------

## sulu

sh.id.lv:

Oh weird.   :Embarassed: 

Sometimes Linux sucks, flame me if you like.

On topic, i heard something about nforce and APIC do not work together.

Did you try disableing APIC in your kernel config?

Edit:

Inbeliveable ! I could not find anything in the web?

There must be others with the same problem.

Wouldnt it make sense to start a thread in tke kernel-trap-forums ?

----------

## isnogood

I got something like this going on,too.It wasn;t happening with some other setup.Helpful,ain't it?   :Laughing:   :Laughing: 

My best guess is that the problem is somewhere here:

dmesg gentoo:

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

hda: WDC WD800JB-00FMA0, ATA DISK drive

hdb: Maxtor 2F040L0, ATA DISK drive

Using anticipatory io scheduler

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: HL-DT-ST GCE-8320B, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 p8 >

hdb: max request size: 128KiB

hdb: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(133)

 /dev/ide/host0/bus0/target1/lun0: p1 p2 p3 < p5 p6 >

dmesg knoppix:

NFORCE2: 00:09.0 (rev a2) UDMA133 controller

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

hda: WDC WD800JB-00FMA0, ATA DISK drive

hdb: Maxtor 2F040L0, ATA DISK drive

hdc: HL-DT-ST GCE-8320B, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: attached ide-disk driver.

hda: host protected area => 1

hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=9729/255/63

hdb: attached ide-disk driver.

hdb: host protected area => 1

hdb: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=4998/255/63

Partition check:

 hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 >

 hdb: hdb1 hdb2 hdb3 < hdb5 hdb6 >

With knoppix I get about 20% CPU when I move big files around.

Dunno if the different CHS or the /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 p8 > bit makes a difference.

The only difference I see is that knoppix uses a 2.6.6 kernel vs. the 2.6.7 I got running and that there is no udev or devfs with knoppix.

EDIT: knoppix used a 2.4 kernel - 100% CPU with 2.6.6Last edited by isnogood on Tue Jul 27, 2004 11:52 am; edited 1 time in total

----------

## PrakashP

Which kernel is used in knoppix? Could you try that kernel in gentoo?

----------

## sh.id.lv

isnogood, i also tried with knoppix - <30% cpu usage..

----------

## sh.id.lv

How i can try knoppix kernel in gentoo?

----------

## isnogood

EDIT: I am a dumbass - forgot that knoppix boots into 2.4.x by default.With knoppix26 it also uses 100% CPU.

2.4 kernels didn't do anything but crash and burn for me since I attached two hdd's meaning I am stuck with 2.6 for now anyway.

I'll try an knoppix install with a 2.4 kernel and see how that goes.

You can't use the original koppix kernel with gentoo because it probably doesn't have devfs enabled.Last edited by isnogood on Tue Jul 27, 2004 11:54 am; edited 1 time in total

----------

## PrakashP

It is interesting, as I just tried with my libata driver and have no problem, it really just takes a bit of CPU. While compiling I did a cat /dev/sda>/dev/null and the compiling just went a bit slower.

Have you tried something similar?

----------

## PrakashP

I am trying to find out whther the different chs settings could be actually the problem you are experiencing.

Best would be if you try to get oprofile going and then find out which function in the kernel eats up all the cpu. Then it would be easier to diagnose what the problem actually is .

----------

## isnogood

Like all 2.4 kernels the knoppix kernel crashes real quick for me but 2.4 should work with one hdd - never had a problem with one.

oprofile tells me:

bash-2.05b# opreport

CPU: Athlon, speed 2079.45 MHz (estimated)

Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000

CPU_CLK_UNHALT...|

  samples|      %|

------------------

   275989 52.6169 no-vmlinux

    58374 11.1289 libqt-mt.so.3.3.0

    52496 10.0083 ld-2.3.3.so

Now all I need to figure out to see what is going on in the kernel is to build a vmlinux that is small enough to boot,right?

----------

## PrakashP

Are you having an nforce2 board? You should try to disable disconnect then as a quick workaround for the 2.4 kernel (->athcool).

Unfortunately I have never tried to profile the kernel, so I am not sure how to make that vmlinux. Is there a tutorial at the oprofile site which explains it?

----------

## isnogood

There is a vmlinux done by default - me thinks but it is about 7,8 mb in my case.I'll need to rebuild the kernel with modules for about everything to make it small enough to boot.

Tried the disconnect and all the other goodies (acpi and the likes) to no avail with 2.4.

Gotta go and drink beer now - I'll figure that vmlinux business out afterwards.

----------

## PrakashP

Are you sure you need to boot it? Isn't it enough to point oprofile to it?

----------

## isnogood

I get a different output when I copy vmlinux to /boot and point oprofile to it but it's not very enlightening either  :Shocked: 

CPU: Athlon, speed 2079.45 MHz (estimated)

Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000

CPU_CLK_UNHALT...|

  samples|      %|

------------------

   275989 28.0463 no-vmlinux

   226663 23.0337 vmlinux-2.6.7

   109641 11.1418 ld-2.3.3.so

   104045 10.5732 libqt-mt.so.3.3.0

----------

## PrakashP

Try: opreport -l

BTW, don't forget to opcontrol --reset between profiling runs or it will keep old data (as in your case, I guess):

----------

## isnogood

OK - I get about half a mile output now.If I had the slightest idea what to do with it.....

----------

## isnogood

Just for the heck of it - here are the first couple of lines with opreport -l -m

CPU: Athlon, speed 2079.64 MHz (estimated)

Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000

samples  cum. samples  %        cum. %     image name               app name                 symbol name

7539     7539          13.1369  13.1369    vmlinux-2.6.7            cp                       __copy_to_user_ll

7298     14837         12.7169  25.8538    vmlinux-2.6.7            cp                       __copy_from_user_ll

1451     16288          2.5284  28.3822    XFree86                  XFree86                  (no symbols)

1178     17466          2.0527  30.4349    vmlinux-2.6.7            vmlinux-2.6.7            mark_offset_tsc

968      18434          1.6868  32.1217    libstdc++.so.5.0.5       kdeinit                  (no symbols)

885      19319          1.5421  33.6638    vmlinux-2.6.7            vmlinux-2.6.7            ide_outb

879      20198          1.5317  35.1955    libgklayout.so           firefox-bin              (no symbols)

778      20976          1.3557  36.5512    libkdeui.so.4.2.0        kdeinit                  (no symbols)

685      21661          1.1936  37.7448    libkdecore.so.4.2.0      kdeinit                  (no symbols)

667      22328          1.1623  38.9071    vmlinux-2.6.7            vmlinux-2.6.7            mask_and_ack_8259A

513      22841          0.8939  39.8010    vmlinux-2.6.7            vmlinux-2.6.7            irq_entries_start

512      23353          0.8922  40.6932    vmlinux-2.6.7            vmlinux-2.6.7            radix_tree_delete

464      23817          0.8085  41.5017    nvidia                   nvidia                   (no symbols)

456      24273          0.7946  42.2963    vmlinux-2.6.7            vmlinux-2.6.7            ide_inb

453      24726          0.7894  43.0857    libc-2.3.3.so            kdeinit                  (no symbols)

385      25111          0.6709  43.7565    libc-2.3.3.so            gkrellm                  (no symbols)

375      25486          0.6534  44.4100    libc-2.3.3.so            cp                       (no symbols)

367      25853          0.6395  45.0495    vmlinux-2.6.7            cp                       generic_file_aio_write_nolock

343      26196          0.5977  45.6472    vmlinux-2.6.7            XFree86                  unix_poll

338      26534          0.5890  46.2361    vmlinux-2.6.7            cp                       blkstol2

332      26866          0.5785  46.8147    vmlinux-2.6.7            cp                       __rmqueue

316      27182          0.5506  47.3653    libc-2.3.3.so            XFree86                  (no symbols)

314      27496          0.5472  47.9125    vmlinux-2.6.7            cp                       buffered_rmqueue

286      27782          0.4984  48.4108    libglib-2.0.so.0.400.1   firefox-bin              (no symbols)

285      28067          0.4966  48.9074    libpthread-0.10.so       kdeinit                  (no symbols)

269      28336          0.4687  49.3762    oprofiled                oprofiled                (no symbols)

268      28604          0.4670  49.8432    vmlinux-2.6.7            cp                       __might_sleep

267      28871          0.4653  50.3084    vmlinux-2.6.7            vmlinux-2.6.7            shrink_cache

266      29137          0.4635  50.7719    vmlinux-2.6.7            cp                       jfs_get_blocks

256      29393          0.4461  51.2180    vmlinux-2.6.7            cp                       system_call

248      29641          0.4321  51.6502    libgobject-2.0.so.0.400.1 firefox-bin              (no symbols)

237      29878          0.4130  52.0631    vmlinux-2.6.7            cp                       xtSearch

231      30109          0.4025  52.4657    vmlinux-2.6.7            cp                       radix_tree_insert

225      30334          0.3921  52.8577    vmlinux-2.6.7            cp                       radix_tree_lookup

220      30554          0.3834  53.2411    vmlinux-2.6.7            cp                       find_get_page

218      30772          0.3799  53.6210    libxpcom.so              firefox-bin              (no symbols)

215      30987          0.3746  53.9956    libpthread-0.10.so       firefox-bin              (no symbols)

207      31194          0.3607  54.3563    libc-2.3.3.so            firefox-bin              (no symbols)

207      31401          0.3607  54.7170    vmlinux-2.6.7            vmlinux-2.6.7            radix_tree_tag_clear

198      31599          0.3450  55.0620    vmlinux-2.6.7            cp                       dbAllocBits

193      31792          0.3363  55.3983    libgfx_gtk.so            firefox-bin              (no symbols)

192      31984          0.3346  55.7329    vmlinux-2.6.7            vmlinux-2.6.7            enable_8259A_irq

190      32174          0.3311  56.0640    vmlinux-2.6.7            vmlinux-2.6.7            free_pages_bulk

----------

## PrakashP

Well, obviosly  cp __copy_to_user_ll and cp __copy_from_user_ll uses most of your CPU.

Now try opannotate to get the sources of vmlinux (first try to get the report only for the vmlinux) and then we could try to search for above functions and look what eats up CPU.

Both functions are in arch/i386/lib/usercopy.c, but I cannot clearly make out what is the purpose due to soem assembly, as well...

On the other hand, I don't know whether anything is wrong in your case. Above two functions are only using about 25% together, which sounds not good but OK for DMA transfers.

----------

## isnogood

I am starting to suspect that something is borked in the way top and gkrell report the CPU usage - with gtop I don't see anything more than 20-30% CPU use.Wouldn't be the first time that the monitors disagree  :Shocked:   :Shocked: 

----------

## PrakashP

As I said in above post: Try to do something cpu intensive while doing hd transfers and then check whether the cpu stuff starves or just gets a bit slower. If the latter is the case, there is nothing to worry.

----------

## blaster999

When I do 

```
cat /dev/hdb>/dev/null
```

and run top, the cat command is reported to use more CPU than anything else. 

Moreover, I noticed that the game majesty (an old 2d RTS/RPG) also uses 100% CPU. I think this started to happen after a kernel upgrade (and I use the same config for all kernels). Could it be a bug?

----------

## isnogood

Ok - emerged ethereal twice;one time while doing cat /dev/hdb>/dev/null at the same time.

real    9m24.510s

user    5m53.763s

sys     1m44.067s

real    11m48.288s

user    6m9.209s

sys     1m57.589s

Takes about 20% longer which should be ok.There still might be something wrong with the way the CPU is used during file operations but it doesn't seem to effect performance - at least here.

----------

## ivanova

When doing the above tests, what was the priorities set at?

If the cat command had a lower priority than the compile command, that would not give an accurate indication.

----------

## hefe

I opened a thread in this forum days ago!

[url]

https://forums.gentoo.org/viewtopic.php?t=213203&start=0&postdays=0&postorder=asc&highlight=sis5513+100+cpu

[/url]

As you will see it is the same problem, but on sis5513 chipset. I made a nice site at

http://rcswww.urz.tu-dresden.de/~s4248297/gubed/report.html

and posted a PROBLEM report to the linux-kernel mailing list. but they dont seem to care much about that.

My top tells me about 90% wa and the rest up to 100% is other stuff.

http://bugzilla.kernel.org/show_bug.cgi?id=2983

 that is another one who has that problem (he stopped using 2.6).

----------

## feld

ive got the problem too

Epox 8RDA3+

working on it too..... trying nforce ide thingy...... then maybe screw with kernel for a bit

-Feld

----------

## feld

i found this

http://lkml.org/lkml/2004/4/3/86

now i just need to know how to use the patch and it should fix it i guess!

-Feld

----------

## PrakashP

This is obsolete and not helpfull in this case. (Or are you getting lock-ups?)

----------

## Jazz

yep , i'm on a intel 845ge board, and i too get a 100% cpu usage while doin transfers or  the cat /dev/hda>/dev/null ..

i'm using a 2.6 kernel too..

any solutions ?

BYe,

Jazz

----------

## feld

SOLVED on my nforce 2 epox 8RDA3+

i dont know how STUPID this sounds but many of you nforce users having the same problem might have forgotten ONE important step that has been screwing me over in a few ways

AFTER you compile the kernel

BEFORE you copy it over

DONT FORGET TO

mount /boot  !!!!!!!!!

its been doing nothing and i've been thinking my new settings were worthless. I went from a STUPID CRAPPY no DMA 4mb ONLY on Timing Buffered reads to

Timing buffered disk reads:  140 MB in  3.03 seconds =  46.20 MB/sec

thats considerably better, dont you think?   :Wink: 

-Feld

----------

## ivanova

What kernel and settings did you use?

----------

## alv

I have the same problem on every machine that I have.

look at the output of top. 

I will bet that your user and sys percentages are low, while wa is high. WA stands for "idle, waiting for IO" and is reported separately from idle in some kernels.

This means that depending on how your meters track usage, it may seem like all cpu is used. In reality, if that CPU time was being wasted, then you would see a high sys usage, since the kernel would be spin-waiting for the IO to complete (as in the case with no DMA).

In other words: nothing to worry about. Get a better cpu monitor.

----------

## irondog

I noticed this problems weeks ago: It was when using mandrake on a non-nforce2 board and I noticed the 100% load 'problem'. 

I tested knoppix with kernel 2.6 and concluded it wasn't a mandrake thing, but a kernel 2.6 issue.

Knoppix with a 2.4 kernel reported the things you would expect: 20% cpu usage when doing nasty dd stuff.

The problem is just we don't know how to read the things top reports: 80% WA isn't anything to worry about. Compare gkrellm2 with top for example  :Smile: 

----------

## Jazz

i see 100% cpu usage on superkaramba, is that anything to worry about ?

But the thing is that all my operations become REALLY slow, as if nothing is working or the system just froze..

after the copy, everything pops up suddenly..

and i'm getting 61mbps reads with hdparm , so i've certainly enabled the right settings for my hdd..

BYe,

Jazz

----------

## devast

 *alv wrote:*   

> I have the same problem on every machine that I have.
> 
> look at the output of top. 
> 
> I will bet that your user and sys percentages are low, while wa is high. WA stands for "idle, waiting for IO" and is reported separately from idle in some kernels.
> ...

 

Here's the point  :Smile:  I have DMA enabled, but the WA load is still ~80% and the cp process uses about 14-16%  :Smile:  I'm using CFQ i/o scheduler. Those who feel the system slow in i/o processes try another scheduler like deadline or CFQ. My system is really fast while i'm doing cat /dev/sda > /dev/null .

----------

## alv

If you are experiencing a slowdown when doing dd or cat, then it is a dma issue.

When DMA is turned off, the kernel has to wait until the data has been transferred to memory, as it has to oversee every byte. This means high sys CPU, and things like mouse stop moving, key presses not appearing. In other words, bad stuff.

If you have DMA, AND there are no processes waiting, then you get the CPU into a wait state. CPU is idle, but ready to go. I think this means that the CPU is going to be spinning on lots of NOPs. It may possibly means that the CPU is going to sleep until the next interrupt, so I am  not sure. Either way, the CPU is idle.

This measurement was introduced in 2.6 kernels, and is always 0 in the 2.4 kernels. Hence the perceived problem.

So use something that actually displays the wa, and consider that time idle.

You are not using 100% of your CPU. Using another process scheduler is not going to help. You are idle, there is nothing to schedule.

However, if you performace is not up to par, and you have high wa and low sys, this means that your harddrive is not keeping up with the requests that are being made to it. You need to check if you are running the right DMA. 

Oh, and to check if you are using DMA just do "hdparm -d /dev/hd(x)".  If someone knows how to do this for the SCSI drives, I would be very thankful.

Notice: You may have fast transfer times even with DMA off. Usually this means that the other processes are sleeping. Fast transfer is not an indictation that everything is correct.

----------

## sh.id.lv

Still no solution?

----------

## lavid

I'm using a Biostar IDeq 200n (nforce2 ultra) with a VIA VT6420 SATA RAID Controller

my sata drives are a seagate 7200.7 200GB on the first sata channel

a seagate 7200.8 300GB on the 2nd sata channel

and my ide drives are a 160GB Western Digital WD1600JB on the primary ide master

and a NEC ND-3500AG on the secondary master

i've been noticing very slow transfer rates on my SATA drives and an inability to sucessfully enable DMA on the ide devices.

hdparm -Tt /dev/sda gives:

/dev/sda:

 Timing cached reads:   1404 MB in  2.01 seconds = 700.01 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:   54 MB in  3.19 seconds =  16.92 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

and hdparm -Tt /dev/sdb gives:

/dev/sdb:

 Timing cached reads:   1360 MB in  2.00 seconds = 679.08 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:   34 MB in  3.07 seconds =  11.08 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

any advice would be greatly appreciated. I've tried vanilla sources 2.6.12-rc3, gentoo sources 2.6.11-r6, love sources 2.6.12.rc2-love1 and nothing seems to be able to fix the problem

thanks in advance,

lavid

----------

