Skip to contentSkip to conversation

Driver snd-hrtimer - causing system freeze with Rosegarden

DISCUSSION Takashi Iwai 1 participant 1 message Dec 10, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

At Wed, 09 Dec 2009 23:04:30 +0100,

Quoted 11 lines · [email protected] wrote:

Dear Takashi,

I've sent the attached message to the LKML, but I think that it may be also reasonable to contact you - the author of the snd-hrtimer. I've tried to find reasons for instability of system running the sequencer using HR timer.
My results are summarized in the attached bug report.
Could you please check if calling of hrtimer_cancel from xnd_hrtimer_stop, which sometimes is called from the callback may cause the obderved instability?

hrtimer_cancel() is very simple and doesn't sleep (but spins). So, this shouldn't be the real issue.

Quoted 10 lines

I have tested the problem on two SMP machines with diffrent kernels (2.6.30, 2.6.31.6, 2.6.32).
The problem seems to be associated with the "snd-hrtimer" module. I've tried to run the application vie remote X session, while having the text console active.
Before the machine froze, the following messages have been displayed in the console:

System 1 (Intel(R) Pentium(R) 4 CPU 2.80GHz HT)

Quoted 7 lines

hrtimer: interrupt too slow, forcing clock min delta to 3568 ns

System 2 (Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz)
hrtimer: interrupt too slow, forcing clock min delta to 11103 ns
CE: hpet increasing min_delta_ns to 15000 nsec
CE: hpet increasing min_delta_ns to 22500 nsec
CE: hpet increasing min_delta_ns to 33750 nsec

Hm, this sounds weird.
Does hrtimer work reliably on your machine?

Quoted 4 lines

Analyzing the problem, I had an idea, that maybe the snd-hrtimer should be rewritten to call
the callback via tasklet (I attach my patch only as an ilustration, my code doesn't work either),

Basically snd-hrtimer already uses tasklet (more exactly, snd-timer handles callbacks in tasklet as default except for the objects with SNDRV_TIMER_HW_TASKLET). So your patch is wrapping over a wrap.

Takashi