All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: mmotm 2008-11-13-17-22 uploaded (pc-speaker)
Date: Fri, 14 Nov 2008 09:30:01 +0100	[thread overview]
Message-ID: <1226651401.7685.6977.camel@twins> (raw)
In-Reply-To: <s5hr65ek9fs.wl%tiwai@suse.de>

On Fri, 2008-11-14 at 09:17 +0100, Takashi Iwai wrote:
> At Fri, 14 Nov 2008 09:03:14 +0100,
> Peter Zijlstra wrote:
> > 
> > On Fri, 2008-11-14 at 07:47 +0100, Takashi Iwai wrote:
> > > At Fri, 14 Nov 2008 07:36:54 +0100,
> > > I wrote:
> > > > 
> > > > At Thu, 13 Nov 2008 21:18:42 -0800,
> > > > Randy Dunlap wrote:
> > > > > 
> > > > > 
> > > > > mmotm-2008-1113-1722/sound/drivers/pcsp/pcsp.c: In function 'snd_card_pcsp_probe':
> > > > > mmotm-2008-1113-1722/sound/drivers/pcsp/pcsp.c:99: error: 'HRTIMER_CB_IRQSAFE' undeclared (first use in this function)
> > > > > 
> > > > > # CONFIG_SND_HRTIMER is not set
> > > > 
> > > > snd-pcsp and CONFIG_SND_HRTIMER are independent.
> > > > The snd-pcsp driver code isn't changed over weeks, thus it must be the
> > > > change in hrtimer side.
> > > 
> > > It's turned out to be the recent commint in the upstream:
> > > 
> > >   commit 621a0d5207c18012cb39932f2d9830a11a6cb03d
> > >   Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > >   Date:   Wed Nov 12 09:36:35 2008 +0100
> > > 
> > >     hrtimer: clean up unused callback modes
> > > 
> > >     Impact: cleanup
> > > 
> > >     git grep HRTIMER_CB_IRQSAFE revealed half the callback modes are actually
> > >     unused.
> > > 
> > >     Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > > 
> > > This hits on snd-pcsp driver on linux-next, since it was switched to
> > > use this dropped flag.  Now we get a build error.
> > > 
> > > Can this commit be reverted?
> > 
> > I think we determined the silly pc speaker driver should be using the
> > SOFTIRQ timer, why was this changed back again?
> 
> It uses a tasklet inside now.
> The background story is:   pcsp driver does register bit flips at each
> hrtimer callback.  This should be done as accurate as possible for the
> sound quality (heh, who matters?).  The register flip itself doesn't
> take time and no lock problem.  Thus, IRQSAFE is more appropriate just
> for this task.
> 
> The reason we used the softirq mode is the call of the ALSA core
> update part.  This is eventually called after the given samples have
> been processed.  And, this could cause a spin deadlock if called
> directly from hrtimer callback.
> 
> In the latest code, the call of ALSA PCM core is off-loaded via
> tasklet for avoiding both spin deadlock and too long hrtimer
> handling.

Aside from the fact that I think tasklets should die a horrible death
too, could you, for now, try to use HRTIMER_CB_IRQSAFE_UNLOCKED ?




  reply	other threads:[~2008-11-14  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14  1:22 mmotm 2008-11-13-17-22 uploaded akpm
2008-11-14  5:16 ` mmotm 2008-11-13-17-22 uploaded (RTC build error) Randy Dunlap
2008-11-14  6:54   ` Alessandro Zummo
2008-11-14  5:16 ` mmotm 2008-11-13-17-22 uploaded (dquot build errors) Randy Dunlap
2008-11-14  5:18 ` mmotm 2008-11-13-17-22 uploaded (pc-speaker) Randy Dunlap
2008-11-14  6:36   ` Takashi Iwai
2008-11-14  6:47     ` Takashi Iwai
2008-11-14  8:03       ` Peter Zijlstra
2008-11-14  8:17         ` Takashi Iwai
2008-11-14  8:30           ` Peter Zijlstra [this message]
2008-11-14  8:36             ` Takashi Iwai
2008-11-14 16:04               ` Takashi Iwai
2008-11-26 10:52                 ` Takashi Iwai
2008-11-26 13:40                   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1226651401.7685.6977.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=randy.dunlap@oracle.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.