Re: RELENG_7: interrupt eating whole cpu core

2008-02-15 Thread Tom Evans
On Tue, 2008-02-12 at 15:53 +0100, Oliver Fromme wrote:
> Tom Evans wrote:
>  > The chipset supports UDMA6, the drive supports UDMA6,
> 
> Are you sure about that?  What brand/model is that?
> I don't think I've ever seen an atapi CD/DVD drive
> that supported more than UDMA3.
> 
> Best regards
>Oliver
> 
I actually made a mistake there; the drive supports 'ATA/ATAPI Revision
6', which is, of course, UDMA5. This is according to atacontrol, and is
used when booted up into windows 2000. 

I believe UDMA modes will give less resource usage compared to WDMA
modes, and combined with a large read-ahead cache in mplayer, should
prolong battery life by spinning up less frequently and remaining
spinning for less time, therefore I'm going to continue to try and get
it to correctly allow my DVD drive to use these modes. 

As for drives not supporting more than udma3, seems ok on linux.

/dev/hda:

ATAPI CD-ROM, with removable media
Model Number:   PIONEER DVD-RW  DVR-112 
Serial Number:  GFDP176727WL   
Firmware Revision:  1.21
Standards:
Likely used CD-ROM ATAPI-1
Configuration:
DRQ response: 50us.
Packet size: 12 bytes
Capabilities:
LBA, IORDY(can be disabled)
Buffer size: 64.0kB
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4 
 Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4 
 Cycle time: no flow control=240ns  IORDY flow control=120ns



signature.asc
Description: This is a digitally signed message part


Re: RELENG_7: interrupt eating whole cpu core

2008-02-12 Thread Oliver Fromme
Tom Evans wrote:
 > The chipset supports UDMA6, the drive supports UDMA6,

Are you sure about that?  What brand/model is that?
I don't think I've ever seen an atapi CD/DVD drive
that supported more than UDMA3.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"A language that doesn't have everything is actually easier
to program in than some that do."
-- Dennis M. Ritchie
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-12 Thread Dominic Fandrey

Tom Evans wrote:

On Fri, 2008-02-08 at 19:35 +0100, Dominic Fandrey wrote:

Tom Evans wrote:

On Fri, 2008-02-08 at 17:14 +0100, Dominic Fandrey wrote:

Tom Evans wrote:

If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:
I think any DMA mode is fast enough to handle a DVD drive. There's just no 
necessity for more.



WDMA is not UDMA. Any UDMA variant would be enough. WDMA2 provides a
maximum of 16MiB/s, which will frequently lead to buffer underruns
viewing a DVD. UDMA2 provides a maximum of 33MiB/s, which IS plenty.
16MB/s is exactly what is needed for 12x DVD access. I think this is the usual 
speed for a Notebook drive nowadays and it suffices for me.



# atacontrol mode acd0 udma5

current mode = WDMA2

Same as for me. I'm satisfied with the speed of the drive.

I'm rarely satisfied - I'm quite often not bothered enough to pursue :)
Well, if 12x speed is not enough for you, you have to use an external drive. 
This is not a driver issue. It's just what your drive supports.


The chipset supports UDMA6, the drive supports UDMA6, I should be happy
with WDMA2 because 'thats what works'? Thanks for your 'help'. I'll
continue on here from myself.


I don't know which drive you are using, but mine even only supports 
8xDVD-reading so the highest transfer rate is 9.9606 MB/s. There's no way a 
faster mode would improve anything.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-12 Thread Tom Evans
On Fri, 2008-02-08 at 19:35 +0100, Dominic Fandrey wrote:
> Tom Evans wrote:
> > On Fri, 2008-02-08 at 17:14 +0100, Dominic Fandrey wrote:
> >> Tom Evans wrote:
> >>> If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:
> >> I think any DMA mode is fast enough to handle a DVD drive. There's just no 
> >> necessity for more.
> >>
> > 
> > WDMA is not UDMA. Any UDMA variant would be enough. WDMA2 provides a
> > maximum of 16MiB/s, which will frequently lead to buffer underruns
> > viewing a DVD. UDMA2 provides a maximum of 33MiB/s, which IS plenty.
> 
> 16MB/s is exactly what is needed for 12x DVD access. I think this is the 
> usual 
> speed for a Notebook drive nowadays and it suffices for me.
> 
>  # atacontrol mode acd0 udma5
> >>> current mode = WDMA2
> >> Same as for me. I'm satisfied with the speed of the drive.
> > 
> > I'm rarely satisfied - I'm quite often not bothered enough to pursue :)
> 
> Well, if 12x speed is not enough for you, you have to use an external drive. 
> This is not a driver issue. It's just what your drive supports.

The chipset supports UDMA6, the drive supports UDMA6, I should be happy
with WDMA2 because 'thats what works'? Thanks for your 'help'. I'll
continue on here from myself.


signature.asc
Description: This is a digitally signed message part


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Peter Jeremy
On Fri, Feb 08, 2008 at 12:22:38AM -0200, Carlos A. M. dos Santos wrote:
>Wow, now I'm *really* surprised. I used to think that putting
>
> hw.ata.ata_dma="1"
> hw.ata.atapi_dma="1"

hw.ata.ata_dma has no effect on ATAPI devices.

>in /boot/loader.conf would be enough to enable DMA mode.

Looking at the code, atapi_dma will enable UDMA modes if the drive
supports at least UDMA2 them but ignores WDMA capabilities.  This was
part of the ATA mkIII update - which is in 6.x but was not MFC'd to
5.x.  If you do a verbose boot, you will get a probe line reporting
the drive capabilities.  Unfortunately, atacontrol only reports 'dma
[not] supported' - not what capabilities the drive has.

>1. Is this related to using atapicam?

No.

>2. Should this be considered a bug?

Possibly.  The relevant commit message doesn't mention the ATAPI DMA
changes so it's not clear whether this is an oversight or deliberate.

I do recall that there have been problems in the past with ATAPI
drives that would advertise DMA capabilities but would misbehave if
you used DMA (atapi_dma was disabled by default in 5.x for this
reason).  I'm not sure if the current code is at effort to avoid this.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


pgpIQYQNr4R4r.pgp
Description: PGP signature


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Dominic Fandrey

Tom Evans wrote:

On Fri, 2008-02-08 at 17:14 +0100, Dominic Fandrey wrote:

Tom Evans wrote:

If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:
I think any DMA mode is fast enough to handle a DVD drive. There's just no 
necessity for more.




WDMA is not UDMA. Any UDMA variant would be enough. WDMA2 provides a
maximum of 16MiB/s, which will frequently lead to buffer underruns
viewing a DVD. UDMA2 provides a maximum of 33MiB/s, which IS plenty.


16MB/s is exactly what is needed for 12x DVD access. I think this is the usual 
speed for a Notebook drive nowadays and it suffices for me.



# atacontrol mode acd0 udma5

current mode = WDMA2

Same as for me. I'm satisfied with the speed of the drive.


I'm rarely satisfied - I'm quite often not bothered enough to pursue :)


Well, if 12x speed is not enough for you, you have to use an external drive. 
This is not a driver issue. It's just what your drive supports.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Pieter de Goeje
On Friday 08 February 2008, Tom Evans wrote:
> On Fri, 2008-02-08 at 17:14 +0100, Dominic Fandrey wrote:
> > Tom Evans wrote:
> > > If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:
> >
> > I think any DMA mode is fast enough to handle a DVD drive. There's just
> > no necessity for more.
>
> WDMA is not UDMA. Any UDMA variant would be enough. WDMA2 provides a
> maximum of 16MiB/s, which will frequently lead to buffer underruns
> viewing a DVD. UDMA2 provides a maximum of 33MiB/s, which IS plenty.
DVD video is encoded at max. ~7Mbit/sec, which is way below 16MB/sec. You 
should have no problems viewing dvds.

>
> > >> # atacontrol mode acd0 udma5
> > >
> > > current mode = WDMA2
> >
> > Same as for me. I'm satisfied with the speed of the drive.
>
> I'm rarely satisfied - I'm quite often not bothered enough to pursue :)
>
> Tom

-- 
Pieter de Goeje

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Tom Evans
On Fri, 2008-02-08 at 17:14 +0100, Dominic Fandrey wrote:
> Tom Evans wrote:
> > If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:
> 
> I think any DMA mode is fast enough to handle a DVD drive. There's just no 
> necessity for more.
> 

WDMA is not UDMA. Any UDMA variant would be enough. WDMA2 provides a
maximum of 16MiB/s, which will frequently lead to buffer underruns
viewing a DVD. UDMA2 provides a maximum of 33MiB/s, which IS plenty.

> >> # atacontrol mode acd0 udma5
> > current mode = WDMA2
> 
> Same as for me. I'm satisfied with the speed of the drive.

I'm rarely satisfied - I'm quite often not bothered enough to pursue :)

Tom


signature.asc
Description: This is a digitally signed message part


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Dominic Fandrey

Tom Evans wrote:

On Fri, 2008-02-08 at 11:43 -0200, Carlos A. M. dos Santos wrote:


Yes, it happens in my notebook (HP NX6320).


Sorry to jump into this thread, as it is slightly off-topic - I have a
HP NC6320 (so not quite exact same model, but specs seem extremely close
- mine is a core duo, not core 2 duo, but chipset, graphics, screen size
is identical), and cannot get my DVD drive to operate in DMA mode. I
track RELENG_7, last updated 3rd Feb.

I have: 


acd0: DVDR  at ata0-master PIO4

on a 


atapci0:  port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x60a0-0x60af irq 16 at device 31.1
on pci0
ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]

with settings of

hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma: 1

atacontrol says this about the DVD drive:


# atacontrol info ata0; atacontrol cap acd0

Master: acd0  ATA/ATAPI revision 6
Slave:   no device present

Protocol  ATA/ATAPI revision 6
device model  MATSHITADVD-RAM UJ-840S
serial number 
firmware revision 1.11

cylinders 0
heads 0
sectors/track 0
lba supported 
lba48 not supported   
dma supported

overlap not supported

Feature  Support  EnableValue   Vendor
write cacheno   no
read ahead no   no
Tagged Command Queuing (TCQ)   no   no  0/0x00
SMART  no   no
microcode download no   no
security   no   no
power management   no   no
advanced power management  no   no  0/0x00
automatic acoustic management  no   no  0/0x00  0/0x00


# atacontrol mode acd0

current mode = PIO4

If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:


I think any DMA mode is fast enough to handle a DVD drive. There's just no 
necessity for more.



# atacontrol mode acd0 udma5

current mode = WDMA2


Same as for me. I'm satisfied with the speed of the drive.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Tom Evans
On Fri, 2008-02-08 at 11:43 -0200, Carlos A. M. dos Santos wrote:
> 
> Yes, it happens in my notebook (HP NX6320).

Sorry to jump into this thread, as it is slightly off-topic - I have a
HP NC6320 (so not quite exact same model, but specs seem extremely close
- mine is a core duo, not core 2 duo, but chipset, graphics, screen size
is identical), and cannot get my DVD drive to operate in DMA mode. I
track RELENG_7, last updated 3rd Feb.

I have: 

acd0: DVDR  at ata0-master PIO4

on a 

atapci0:  port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x60a0-0x60af irq 16 at device 31.1
on pci0
ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]

with settings of

hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma: 1

atacontrol says this about the DVD drive:

> # atacontrol info ata0; atacontrol cap acd0
Master: acd0  ATA/ATAPI revision 6
Slave:   no device present

Protocol  ATA/ATAPI revision 6
device model  MATSHITADVD-RAM UJ-840S
serial number 
firmware revision 1.11
cylinders 0
heads 0
sectors/track 0
lba supported 
lba48 not supported   
dma supported
overlap not supported

Feature  Support  EnableValue   Vendor
write cacheno   no
read ahead no   no
Tagged Command Queuing (TCQ)   no   no  0/0x00
SMART  no   no
microcode download no   no
security   no   no
power management   no   no
advanced power management  no   no  0/0x00
automatic acoustic management  no   no  0/0x00  0/0x00

> # atacontrol mode acd0
current mode = PIO4

If I try to turn on DMA, I just get WDMA2, which just doesn't cut it:

> # atacontrol mode acd0 udma5
current mode = WDMA2

This occurs if I try to set mode udma[2-6]

It doesn't bother me too much, as I rarely use the CD drive in this
laptop, but if you have similar hardware and can set UDMA modes on your
DVD, I'd be interested. (I've also attached an (aged) verbose boot log
if anyone else is interested.. (actually, the verbose boot was ancient,
March 2007, so I've attached a recent, non-verbose, log - ask if you
need more!))

Cheers

Tom


Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-PRERELEASE #6: Mon Feb  4 12:43:15 GMT 2008
[EMAIL 
PROTECTED]:/data2/FreeBSD/RELENG_7/obj/data2/FreeBSD/RELENG_7/src/sys/ZOOT
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Genuine Intel(R) CPU   T2500  @ 2.00GHz (1995.02-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6e8  Stepping = 8
  
Features=0xbfe9fbff
  Features2=0xc1a9
  AMD Features=0x10
  Cores per package: 2
real memory  = 1065156608 (1015 MB)
avail memory = 1028657152 (981 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 1
ioapic0  irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
hptrr: HPT RocketRAID controller driver v1.1 (Feb  4 2008 12:42:55)
cryptosoft0:  on motherboard
acpi0:  on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a (3) failed
acpi0: reservation of 10, 3f70 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
acpi_ec0:  port 0x62,0x66 on acpi0
cpu0:  on acpi0
est0:  on cpu0
p4tcc0:  on cpu0
cpu1:  on acpi0
est1:  on cpu1
p4tcc1:  on cpu1
pcib0:  port 0xcf8-0xcff on acpi0
pci0:  on pcib0
vgapci0:  port 0x6000-0x6007 mem 
0xe840-0xe847,0xd000-0xdfff,0xe848-0xe84b irq 16 at 
device 2.0 on pci0
agp0:  on vgapci0
agp0: detected 7932k stolen memory
agp0: aperture size is 256M
drm0:  on vgapci0
info: [drm] AGP at 0xd000 256MB
info: [drm] Initialized i915 1.5.0 20060119
vgapci1:  mem 0xe850-0xe857 at device 2.1 on 
pci0
pci0:  at device 27.0 (no driver attached)
pcib1:  irq 16 at device 28.0 on pci0
pci8:  on pcib1
pci8:  at device 0.0 (no driver attached)
pcib2:  irq 18 at device 28.2 on pci0
pci24:  on pcib2
pcib3:  irq 19 at device 28.3 on pci0
pci32:  on pcib3
uhci0:  port 0x6020-0x603f irq 20 at device 29.0 
on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0:  on uhci0
usb0: USB revision 1.0
uhub0:  on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1:  port 0x6040-0x605f irq 21 at device 29.1 
on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1:  on uhci1
usb1: USB revision 1.0
uhub1:  on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2:  port 0x6060-0x607f irq 18 at device 29.2 
on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2:  on uhci2
usb2: USB revis

Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Dominic Fandrey

David Wolfskill wrote:

On Fri, Feb 08, 2008 at 03:23:33PM +0100, Dominic Fandrey wrote:

Carlos A. M. dos Santos wrote:

On Feb 8, 2008 4:27 AM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:

...
I put the following into my rc.conf:
# Set mode for CD/DVD drive.
/sbin/atacontrol mode acd0 2>&1 | /usr/bin/grep PIO > /dev/null 2>&1 \
   && /sbin/atacontrol mode acd0 UDMA33

Do not put this in rc.conf. It will be executed again each time a
script in /etc/rc.d source rc.conf to obtain the configuration
variables.
Hence the check, weather the drive is in PIO mode or not. The way I 
understand the rc(8) manual page, the same is true for rc.local.

...


As I learned some years ago, rc.conf is for configuration
variable-setting, not executable code.  Ref. (from rc.conf(5)):


Why care about correctly implementing a sloppy solution? I'd rather have a 
good solution correctly implemented. For me that means offering the 
possibility to tweak the ata mode for each device in the /boot/device.hints file.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread David Wolfskill
On Fri, Feb 08, 2008 at 03:23:33PM +0100, Dominic Fandrey wrote:
> Carlos A. M. dos Santos wrote:
> >On Feb 8, 2008 4:27 AM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:
> >>...
> >>I put the following into my rc.conf:
> >># Set mode for CD/DVD drive.
> >>/sbin/atacontrol mode acd0 2>&1 | /usr/bin/grep PIO > /dev/null 2>&1 \
> >>&& /sbin/atacontrol mode acd0 UDMA33
> >
> >Do not put this in rc.conf. It will be executed again each time a
> >script in /etc/rc.d source rc.conf to obtain the configuration
> >variables.
> 
> Hence the check, weather the drive is in PIO mode or not. The way I 
> understand the rc(8) manual page, the same is true for rc.local.
>...

As I learned some years ago, rc.conf is for configuration
variable-setting, not executable code.  Ref. (from rc.conf(5)):

DESCRIPTION
 The file rc.conf contains descriptive information about the local host
 name, configuration details for any potential network interfaces and
 which services should be started up at system initial boot time

/usr/local/etc/rc.d/* generally contains executable code, though.

Peace,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
I submit that "conspiracy" would be an appropriate collective noun for cats.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgp8yBogvex3g.pgp
Description: PGP signature


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Dominic Fandrey

Carlos A. M. dos Santos wrote:

On Feb 8, 2008 4:27 AM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:

Carlos A. M. dos Santos wrote:

On Feb 6, 2008 5:45 PM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:

Chuck Swiger wrote:

Hi, Dominic--

On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:

behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone
thinks it might be helpful, I can supply you with a dmesg and the
output of pciconf -lv.

The problem remains with fresh sources:

 PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
  12 root 1 171 ki31 0K16K RUN0  22:04 97.85%
idle: cpu0
  37 root 1 -64- 0K16K CPU1   1   2:35 96.00%
irq14: ata0
  11 root 1 171 ki31 0K16K RUN1  19:32  6.40%
idle: cpu1

The rip is done by k3b, so the drive is accessed through the cam
interface.

What are the values being reported by "sysctl hw.ata"?  If you're going
to be burning CD/DVDs, you really want to make sure hw.ata.atapi_dma is on.

I cannot believe it was so trivial. The sysctl looks all right.

# sysctl hw.ata  0 /root
hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma: 1

But further research revealed:
# atacontrol mode acd0   0 /root
current mode = PIO4

# atacontrol mode acd0 udma330 /root

changed the load dramatically:
  PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
   12 root  1 171 ki31 0K16K RUN0  52:54 100.00% idle: cpu0
   11 root  1 171 ki31 0K16K CPU1   1  23:36 94.29% idle: cpu1
1087 kamikaze  3  -80   133M 36168K physrd 1   1:09  3.17% k3b
   37 root  1 -64- 0K16K WAIT   1  30:10  0.00% irq14: ata0


Thank you very much! I used to think that UDMA33 was the default for
CD-/DVD-Rom drives. I suppose I should review the BIOS settings or change
something in the hints file.

Wow, now I'm *really* surprised. I used to think that putting

 hw.ata.ata_dma="1"
 hw.ata.atapi_dma="1"

in /boot/loader.conf would be enough to enable DMA mode. In fact I'm
pretty sure it used to be in previous versions of FreeBSD. I created a
/etc/rc.local containing

 #!/bin/sh -
 atacontrol mode acd0 udma33


Did you check weather you are affected, before you applied your solution?
Only one machine is affected.


Yes, it happens in my notebook (HP NX6320).


I put the following into my rc.conf:
# Set mode for CD/DVD drive.
/sbin/atacontrol mode acd0 2>&1 | /usr/bin/grep PIO > /dev/null 2>&1 \
&& /sbin/atacontrol mode acd0 UDMA33


Do not put this in rc.conf. It will be executed again each time a
script in /etc/rc.d source rc.conf to obtain the configuration
variables.


Hence the check, weather the drive is in PIO mode or not. The way I understand 
the rc(8) manual page, the same is true for rc.local.





Two questions, now:

1. Is this related to using atapicam?

Not for me.


2. Should this be considered a bug?

Yes, but not in FreeBSD. It's a bug in the BIOS of my Notebook. This is a
guess, not certainty.


I believe that the kernel must handle this transparently when
hw.ata.atapi_dma is set to 1, but I will need to look at the code this
to see what is happening.


I think it's the job of the BIOS to set this properly. Many BIOS allow you to 
choose the mode and FreeBSD obeys the settings made in the BIOS. To me that 
makes sense. It's a problem of HP that they do not allow to change the setting 
and have chosen such an ill fit default.


Also you cannot just send everything into DMA mode, because all devices can 
have different capabilities.


My preferred solution would be to have device hints for every device to 
override the BIOS settings.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-08 Thread Carlos A. M. dos Santos
On Feb 8, 2008 4:27 AM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:
>
> Carlos A. M. dos Santos wrote:
> > On Feb 6, 2008 5:45 PM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:
> >> Chuck Swiger wrote:
> >>> Hi, Dominic--
> >>>
> >>> On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:
> > behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone
> > thinks it might be helpful, I can supply you with a dmesg and the
> > output of pciconf -lv.
>  The problem remains with fresh sources:
> 
>   PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
>    12 root 1 171 ki31 0K16K RUN0  22:04 97.85%
>  idle: cpu0
>    37 root 1 -64- 0K16K CPU1   1   2:35 96.00%
>  irq14: ata0
>    11 root 1 171 ki31 0K16K RUN1  19:32  6.40%
>  idle: cpu1
> 
>  The rip is done by k3b, so the drive is accessed through the cam
>  interface.
> >>> What are the values being reported by "sysctl hw.ata"?  If you're going
> >>> to be burning CD/DVDs, you really want to make sure hw.ata.atapi_dma is 
> >>> on.
> >> I cannot believe it was so trivial. The sysctl looks all right.
> >>
> >> # sysctl hw.ata  0 /root
> >> hw.ata.wc: 1
> >> hw.ata.atapi_dma: 1
> >> hw.ata.ata_dma: 1
> >>
> >> But further research revealed:
> >> # atacontrol mode acd0   0 /root
> >> current mode = PIO4
> >>
> >> # atacontrol mode acd0 udma330 /root
> >>
> >> changed the load dramatically:
> >>   PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
> >>12 root  1 171 ki31 0K16K RUN0  52:54 100.00% idle: 
> >> cpu0
> >>11 root  1 171 ki31 0K16K CPU1   1  23:36 94.29% idle: 
> >> cpu1
> >> 1087 kamikaze  3  -80   133M 36168K physrd 1   1:09  3.17% k3b
> >>37 root  1 -64- 0K16K WAIT   1  30:10  0.00% irq14: 
> >> ata0
> >>
> >>
> >> Thank you very much! I used to think that UDMA33 was the default for
> >> CD-/DVD-Rom drives. I suppose I should review the BIOS settings or change
> >> something in the hints file.
> >
> > Wow, now I'm *really* surprised. I used to think that putting
> >
> >  hw.ata.ata_dma="1"
> >  hw.ata.atapi_dma="1"
> >
> > in /boot/loader.conf would be enough to enable DMA mode. In fact I'm
> > pretty sure it used to be in previous versions of FreeBSD. I created a
> > /etc/rc.local containing
> >
> >  #!/bin/sh -
> >  atacontrol mode acd0 udma33
> >
>
> Did you check weather you are affected, before you applied your solution?
> Only one machine is affected.

Yes, it happens in my notebook (HP NX6320).

> I put the following into my rc.conf:
> # Set mode for CD/DVD drive.
> /sbin/atacontrol mode acd0 2>&1 | /usr/bin/grep PIO > /dev/null 2>&1 \
> && /sbin/atacontrol mode acd0 UDMA33

Do not put this in rc.conf. It will be executed again each time a
script in /etc/rc.d source rc.conf to obtain the configuration
variables.

> > Two questions, now:
> >
> > 1. Is this related to using atapicam?
>
> Not for me.
>
> > 2. Should this be considered a bug?
>
> Yes, but not in FreeBSD. It's a bug in the BIOS of my Notebook. This is a
> guess, not certainty.

I believe that the kernel must handle this transparently when
hw.ata.atapi_dma is set to 1, but I will need to look at the code this
to see what is happening.

-- 
Carlos A. M. dos Santos
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-07 Thread Dominic Fandrey

Carlos A. M. dos Santos wrote:

On Feb 6, 2008 5:45 PM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:

Chuck Swiger wrote:

Hi, Dominic--

On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:

behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone
thinks it might be helpful, I can supply you with a dmesg and the
output of pciconf -lv.

The problem remains with fresh sources:

 PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
  12 root 1 171 ki31 0K16K RUN0  22:04 97.85%
idle: cpu0
  37 root 1 -64- 0K16K CPU1   1   2:35 96.00%
irq14: ata0
  11 root 1 171 ki31 0K16K RUN1  19:32  6.40%
idle: cpu1

The rip is done by k3b, so the drive is accessed through the cam
interface.

What are the values being reported by "sysctl hw.ata"?  If you're going
to be burning CD/DVDs, you really want to make sure hw.ata.atapi_dma is on.

I cannot believe it was so trivial. The sysctl looks all right.

# sysctl hw.ata  0 /root
hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma: 1

But further research revealed:
# atacontrol mode acd0   0 /root
current mode = PIO4

# atacontrol mode acd0 udma330 /root

changed the load dramatically:
  PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
   12 root  1 171 ki31 0K16K RUN0  52:54 100.00% idle: cpu0
   11 root  1 171 ki31 0K16K CPU1   1  23:36 94.29% idle: cpu1
1087 kamikaze  3  -80   133M 36168K physrd 1   1:09  3.17% k3b
   37 root  1 -64- 0K16K WAIT   1  30:10  0.00% irq14: ata0


Thank you very much! I used to think that UDMA33 was the default for
CD-/DVD-Rom drives. I suppose I should review the BIOS settings or change
something in the hints file.


Wow, now I'm *really* surprised. I used to think that putting

 hw.ata.ata_dma="1"
 hw.ata.atapi_dma="1"

in /boot/loader.conf would be enough to enable DMA mode. In fact I'm
pretty sure it used to be in previous versions of FreeBSD. I created a
/etc/rc.local containing

 #!/bin/sh -
 atacontrol mode acd0 udma33



Did you check weather you are affected, before you applied your solution?
Only one machine is affected.

I put the following into my rc.conf:
# Set mode for CD/DVD drive.
/sbin/atacontrol mode acd0 2>&1 | /usr/bin/grep PIO > /dev/null 2>&1 \
&& /sbin/atacontrol mode acd0 UDMA33



Two questions, now:

1. Is this related to using atapicam?


Not for me.


2. Should this be considered a bug?


Yes, but not in FreeBSD. It's a bug in the BIOS of my Notebook. This is a 
guess, not certainty.


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-07 Thread Carlos A. M. dos Santos
On Feb 6, 2008 5:45 PM, Dominic Fandrey <[EMAIL PROTECTED]> wrote:
> Chuck Swiger wrote:
> > Hi, Dominic--
> >
> > On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:
> >>> behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone
> >>> thinks it might be helpful, I can supply you with a dmesg and the
> >>> output of pciconf -lv.
> >>
> >> The problem remains with fresh sources:
> >>
> >>  PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
> >>   12 root 1 171 ki31 0K16K RUN0  22:04 97.85%
> >> idle: cpu0
> >>   37 root 1 -64- 0K16K CPU1   1   2:35 96.00%
> >> irq14: ata0
> >>   11 root 1 171 ki31 0K16K RUN1  19:32  6.40%
> >> idle: cpu1
> >>
> >> The rip is done by k3b, so the drive is accessed through the cam
> >> interface.
> >
> > What are the values being reported by "sysctl hw.ata"?  If you're going
> > to be burning CD/DVDs, you really want to make sure hw.ata.atapi_dma is on.
>
> I cannot believe it was so trivial. The sysctl looks all right.
>
> # sysctl hw.ata  0 /root
> hw.ata.wc: 1
> hw.ata.atapi_dma: 1
> hw.ata.ata_dma: 1
>
> But further research revealed:
> # atacontrol mode acd0   0 /root
> current mode = PIO4
>
> # atacontrol mode acd0 udma330 /root
>
> changed the load dramatically:
>   PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
>12 root  1 171 ki31 0K16K RUN0  52:54 100.00% idle: 
> cpu0
>11 root  1 171 ki31 0K16K CPU1   1  23:36 94.29% idle: cpu1
> 1087 kamikaze  3  -80   133M 36168K physrd 1   1:09  3.17% k3b
>37 root  1 -64- 0K16K WAIT   1  30:10  0.00% irq14: 
> ata0
>
>
> Thank you very much! I used to think that UDMA33 was the default for
> CD-/DVD-Rom drives. I suppose I should review the BIOS settings or change
> something in the hints file.

Wow, now I'm *really* surprised. I used to think that putting

 hw.ata.ata_dma="1"
 hw.ata.atapi_dma="1"

in /boot/loader.conf would be enough to enable DMA mode. In fact I'm
pretty sure it used to be in previous versions of FreeBSD. I created a
/etc/rc.local containing

 #!/bin/sh -
 atacontrol mode acd0 udma33

Two questions, now:

1. Is this related to using atapicam?

2. Should this be considered a bug?

-- 
Carlos A. M. dos Santos
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-06 Thread Dominic Fandrey

Chuck Swiger wrote:

Hi, Dominic--

On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:
behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone 
thinks it might be helpful, I can supply you with a dmesg and the 
output of pciconf -lv.


The problem remains with fresh sources:

 PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
  12 root 1 171 ki31 0K16K RUN0  22:04 97.85% 
idle: cpu0
  37 root 1 -64- 0K16K CPU1   1   2:35 96.00% 
irq14: ata0
  11 root 1 171 ki31 0K16K RUN1  19:32  6.40% 
idle: cpu1


The rip is done by k3b, so the drive is accessed through the cam 
interface.


What are the values being reported by "sysctl hw.ata"?  If you're going 
to be burning CD/DVDs, you really want to make sure hw.ata.atapi_dma is on.


I cannot believe it was so trivial. The sysctl looks all right.

# sysctl hw.ata  0 /root
hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma: 1

But further research revealed:
# atacontrol mode acd0   0 /root
current mode = PIO4

# atacontrol mode acd0 udma330 /root

changed the load dramatically:
 PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
  12 root  1 171 ki31 0K16K RUN0  52:54 100.00% idle: cpu0
  11 root  1 171 ki31 0K16K CPU1   1  23:36 94.29% idle: cpu1
1087 kamikaze  3  -80   133M 36168K physrd 1   1:09  3.17% k3b
  37 root  1 -64- 0K16K WAIT   1  30:10  0.00% irq14: ata0


Thank you very much! I used to think that UDMA33 was the default for 
CD-/DVD-Rom drives. I suppose I should review the BIOS settings or change 
something in the hints file.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-06 Thread Chuck Swiger

Hi, Dominic--

On Feb 6, 2008, at 11:12 AM, Dominic Fandrey wrote:
behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone  
thinks it might be helpful, I can supply you with a dmesg and the  
output of pciconf -lv.


The problem remains with fresh sources:

 PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU  
COMMAND
  12 root 1 171 ki31 0K16K RUN0  22:04 97.85%  
idle: cpu0
  37 root 1 -64- 0K16K CPU1   1   2:35 96.00%  
irq14: ata0
  11 root 1 171 ki31 0K16K RUN1  19:32  6.40%  
idle: cpu1


The rip is done by k3b, so the drive is accessed through the cam  
interface.


What are the values being reported by "sysctl hw.ata"?  If you're  
going to be burning CD/DVDs, you really want to make sure  
hw.ata.atapi_dma is on.


Regards,
--
-Chuck

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: RELENG_7: interrupt eating whole cpu core

2008-02-06 Thread Dominic Fandrey

Dominic Fandrey wrote:
While ripping DVDs the irq14: ata0 eats ~95% of one of my cores. The 
channel is exclusive to the drive.

>
> ...
>
behaviour has changed. This is an HP 6510b GR695EA#ABD, if anyone thinks 
it might be helpful, I can supply you with a dmesg and the output of 
pciconf -lv.


The problem remains with fresh sources:

  PID USERNAME   THR PRI NICE   SIZERES STATE  C   TIMECPU COMMAND
   12 root 1 171 ki31 0K16K RUN0  22:04 97.85% idle: cpu0
   37 root 1 -64- 0K16K CPU1   1   2:35 96.00% irq14: ata0
   11 root 1 171 ki31 0K16K RUN1  19:32  6.40% idle: cpu1

The rip is done by k3b, so the drive is accessed through the cam interface.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RELENG_7: interrupt eating whole cpu core

2008-02-06 Thread Dominic Fandrey
While ripping DVDs the irq14: ata0 eats ~95% of one of my cores. The channel 
is exclusive to the drive.


# atacontrol list   64 /root
ATA channel 0:
Master: acd0  ATA/ATAPI revision 7
Slave:   no device present
ATA channel 1:
Master:  no device present
Slave:   no device present
ATA channel 2:
Master:  ad4  Serial ATA v1.0
Slave:   no device present
ATA channel 3:
Master:  no device present
Slave:   no device present
ATA channel 4:
Master:  no device present
Slave:   no device present


The number of interrupts looks reasonable to me.

# vmstat -i  0 /root
interrupt  total   rate
irq1: atkbd0   35171  1
irq9: acpi015729  0
irq12: psm010004  0
irq14: ata0  5148195272
irq16: pcm0 uhci0  40783  2
irq17: uhci1+1446238 76
irq18: bge0 ehci0+ 38588  2
irq20: uhci2 ehci1125447  6
irq21: uhci3  156783  8
cpu0: timer 37792079   1999
cpu1: timer 37784062   1999
Total   82593079   4370


I'm currently rebuilding world+kernel. I will report weather the behaviour has 
changed. This is an HP 6510b GR695EA#ABD, if anyone thinks it might be 
helpful, I can supply you with a dmesg and the output of pciconf -lv.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"