Re: intel hda regression: 2.6.33-rc{1,2}: hd-audio0 eats 25% CPU(according to top)

From: Sergei Trofimovich
Date: Fri Dec 25 2009 - 09:25:49 EST


On Fri, 25 Dec 2009 12:18:57 +0100
Takashi Iwai <tiwai@xxxxxxx> wrote:

> At Fri, 25 Dec 2009 12:21:07 +0200,
> Sergei Trofimovich wrote:
> >
> > $SUBJ
> >
> > $ git describe
> > v2.6.33-rc2
> >
> > No matter if I actually play any sounds that process consumes 23-24% CPU
> > Don't know if it's related to above: even if there is no any sound activity
> > I can hear crackling in headphones.
> >
> > $ lspci -vvv
> >
> > 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
> > Subsystem: Hewlett-Packard Company Device 30c9
> > Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
> > Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> > Latency: 0, Cache Line Size: 64 bytes
> > Interrupt: pin A routed to IRQ 27
> > Region 0: Memory at e0644000 (64-bit, non-prefetchable) [size=16K]
> > Capabilities: [50] Power Management version 2
> > Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> > Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> > Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
> > Address: 00000000fee0300c Data: 4191
> > Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
> > DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
> > ExtTag- RBE- FLReset-
> > DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> > RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > MaxPayload 128 bytes, MaxReadReq 128 bytes
> > DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> > LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
> > ClockPM- Surprise- LLActRep- BwNot-
> > LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
> > ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> > LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
> > Capabilities: [100] Virtual Channel <?>
> > Capabilities: [130] Root Complex Link <?>
> > Kernel driver in use: HDA Intel
> > Kernel modules: snd-hda-intel
> >
> > $ powertop
> >
> > Cn Avg residency P-states (frequencies)
> > C0 (cpu running) (25.1%) 1200 Mhz 4.7%
> > C1 0.0ms ( 0.0%) 1067 Mhz 0.2%
> > C2 0.3ms (74.9%) 933 Mhz 0.2%
> > 800 Mhz 94.9%
> >
> >
> > Wakeups-from-idle per second : 2931.9 interval: 10.0s
> > no ACPI power usage estimate available
> >
> > Top causes for wakeups:
> > 80.6% (6766.8) <interrupt> : HDA Intel
> > 10.5% (885.6) <kernel IPI> : Rescheduling interrupts
> > 6.4% (541.3) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)
> This has been already reported by some people, but unfortunately I
> couldn't reproduce this on my test machines.
>
> Eric figured out that replacing the whole sound/pci/hda/* files with
> 2.6.31 works, so this must be a regression in that area.
> Could someone bisect it? The commits to check are restricted only in
> sound/pci/hda, so there shouldn't be many changes.
>
> % git bisect start -- sound/pci/hda
> % git bisect bad
> % git bisect good v2.6.32
>
>
> thanks,

Done:

d56757abc11a21996d9839c0d4e3b2c3666cd318 is the first bad commit
commit d56757abc11a21996d9839c0d4e3b2c3666cd318
Author: Takashi Iwai <tiwai@xxxxxxx>
Date: Wed Nov 18 08:00:14 2009 +0100

ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>

:040000 040000 46040881f7bc4b662a784ac66a6482c2a5b3dca5 6a76aa47a3d0cccad0c8a3ae62cb63ecbdd9b44d M sound

Bisect log:
git bisect start '--' 'sound/pci/hda'
# bad: [55639353a0035052d9ea6cfe4dde0ac7fcbb2c9f] Linux 2.6.33-rc1
git bisect bad 55639353a0035052d9ea6cfe4dde0ac7fcbb2c9f
# good: [22763c5cf3690a681551162c15d34d935308c8d7] Linux 2.6.32
git bisect good 22763c5cf3690a681551162c15d34d935308c8d7
# good: [123c07aeddd71fbb295842a8c19866e780b9a100] ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
git bisect good 123c07aeddd71fbb295842a8c19866e780b9a100
# good: [123c07aeddd71fbb295842a8c19866e780b9a100] ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
git bisect good 123c07aeddd71fbb295842a8c19866e780b9a100
# bad: [0b587fc4d35afb1bc0fc3d890084bb14c78372dc] ALSA: hda: Fix max PCM level to 0 dB for Fujitsu-Siemens laptops using CX2054
9 (Venice)
git bisect bad 0b587fc4d35afb1bc0fc3d890084bb14c78372dc
# good: [23ccc2bd246a5bdb1ac03dc9040a0585c1890ef3] ALSA: intelhdmi - export monitor-presence and ELD-valid status
git bisect good 23ccc2bd246a5bdb1ac03dc9040a0585c1890ef3
# bad: [d56757abc11a21996d9839c0d4e3b2c3666cd318] ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
git bisect bad d56757abc11a21996d9839c0d4e3b2c3666cd318
# good: [848de598eef9603d6f2c174f90fded4e63ac5e23] ALSA: intelhdmi - sticky infoframe
git bisect good 848de598eef9603d6f2c174f90fded4e63ac5e23
# good: [81bf31e2d0a6a9f5d83da0a757f8ca03db908162] ALSA: intelhdmi - sticky channel count
git bisect good 81bf31e2d0a6a9f5d83da0a757f8ca03db908162
# good: [83d605fd63e704419ccb92d48b735c6890ce3d6a] ALSA: hda - show EPSS capability in proc
git bisect good 83d605fd63e704419ccb92d48b735c6890ce3d6a

Sorry, was unable to revert that commit on top of current 2.6.33-rc2 and verify it's guilty.

> Takashi

--

Sergei

Attachment: signature.asc
Description: PGP signature