mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
Cc: Clemens Ladisch <clemens@ladisch.de>, Ingo Molnar <mingo@elte.hu>,
	alsa-devel@alsa-project.org, Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] 2.6.26.[6|7]-rt11, alsa rawmidi, seq hang	(tasklet_hi_schedule?)
Date: Thu, 27 Nov 2008 17:50:52 +0100	[thread overview]
Message-ID: <s5hvdu93yfn.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hiqqkc548.wl%tiwai@suse.de>

At Wed, 19 Nov 2008 12:44:23 +0100,
I wrote:
> 
> At Fri, 14 Nov 2008 10:57:10 -0800,
> Fernando Lopez-Lezcano wrote:
> > 
> > On Fri, 2008-11-14 at 09:15 +0100, Clemens Ladisch wrote:
> > > Fernando Lopez-Lezcano wrote:
> > > > I've been trying to follow the printk crumbs without much success.
> > > > AFAICT it all points to tasklet_hi_schedule ...
> > > 
> > > I don't have -rt, but if the error is similar to the old one you might
> > > try replacing tasklet_hi_schedule with tasklet_schedule.
> > 
> > YES YES!! __Thanks__ for the suggestion, it WORKED!!
> > 
> > Maybe the kernel rt gurus should look around and see _why_ the problem
> > was happening in the first place. There are not that many uses of
> > tasklet_hi_schedule in the kernel tree I'm working with:
> (snip)
> > Maybe other drivers are affected as well by the rt patch. 
> > What is the difference between tasklet_hi_schedule and tasklet_schedule?
> 
> AFAIK, tasklet_hi_schedule() uses another softirq vector with the
> highest priority (the first item to be scanned).
> 
> Regarding the ALSA codes, there is no big reason to use hi_* version.
> Could you check the patch below and see whether you get any
> regressions?

Nando, any chance to test on your machines?


thanks,

Takashi

> 
> 
> thanks,
> 
> Takashi
> 
> ---
> diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
> index 39672f6..002777b 100644
> --- a/sound/core/rawmidi.c
> +++ b/sound/core/rawmidi.c
> @@ -151,7 +151,7 @@ static inline void snd_rawmidi_output_trigger(struct snd_rawmidi_substream *subs
>  	if (!substream->opened)
>  		return;
>  	if (up) {
> -		tasklet_hi_schedule(&substream->runtime->tasklet);
> +		tasklet_schedule(&substream->runtime->tasklet);
>  	} else {
>  		tasklet_kill(&substream->runtime->tasklet);
>  		substream->ops->trigger(substream, 0);
> @@ -908,7 +908,7 @@ int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
>  	}
>  	if (result > 0) {
>  		if (runtime->event)
> -			tasklet_hi_schedule(&runtime->tasklet);
> +			tasklet_schedule(&runtime->tasklet);
>  		else if (snd_rawmidi_ready(substream))
>  			wake_up(&runtime->sleep);
>  	}
> diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c
> index 51e64e3..0851cd1 100644
> --- a/sound/core/rtctimer.c
> +++ b/sound/core/rtctimer.c
> @@ -118,7 +118,7 @@ static void rtctimer_tasklet(unsigned long data)
>   */
>  static void rtctimer_interrupt(void *private_data)
>  {
> -	tasklet_hi_schedule(private_data);
> +	tasklet_schedule(private_data);
>  }
>  
>  
> diff --git a/sound/core/timer.c b/sound/core/timer.c
> index c584408..7965320 100644
> --- a/sound/core/timer.c
> +++ b/sound/core/timer.c
> @@ -743,7 +743,7 @@ void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left)
>  	spin_unlock_irqrestore(&timer->lock, flags);
>  
>  	if (use_tasklet)
> -		tasklet_hi_schedule(&timer->task_queue);
> +		tasklet_schedule(&timer->task_queue);
>  }
>  
>  /*
> diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
> index 473b07f..14e3354 100644
> --- a/sound/drivers/vx/vx_core.c
> +++ b/sound/drivers/vx/vx_core.c
> @@ -548,7 +548,7 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev)
>  	    (chip->chip_status & VX_STAT_IS_STALE))
>  		return IRQ_NONE;
>  	if (! vx_test_and_ack(chip))
> -		tasklet_hi_schedule(&chip->tq);
> +		tasklet_schedule(&chip->tq);
>  	return IRQ_HANDLED;
>  }
>  
> diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
> index 27de574..6644d00 100644
> --- a/sound/drivers/vx/vx_pcm.c
> +++ b/sound/drivers/vx/vx_pcm.c
> @@ -823,7 +823,7 @@ static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
>  		 * we trigger the pipe using tasklet, so that the interrupts are
>  		 * issued surely after the trigger is completed.
>  		 */ 
> -		tasklet_hi_schedule(&pipe->start_tq);
> +		tasklet_schedule(&pipe->start_tq);
>  		chip->pcm_running++;
>  		pipe->running = 1;
>  		break;
> diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
> index 20ee759..e9c3794 100644
> --- a/sound/pci/es1968.c
> +++ b/sound/pci/es1968.c
> @@ -1953,7 +1953,7 @@ static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id)
>  	outw(inw(chip->io_port + 4) & 1, chip->io_port + 4);
>  
>  	if (event & ESM_HWVOL_IRQ)
> -		tasklet_hi_schedule(&chip->hwvol_tq); /* we'll do this later */
> +		tasklet_schedule(&chip->hwvol_tq); /* we'll do this later */
>  
>  	/* else ack 'em all, i imagine */
>  	outb(0xFF, chip->io_port + 0x1A);
> diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
> index 9ff3f9e..59bbaf8 100644
> --- a/sound/pci/maestro3.c
> +++ b/sound/pci/maestro3.c
> @@ -1670,7 +1670,7 @@ static irqreturn_t snd_m3_interrupt(int irq, void *dev_id)
>  		return IRQ_NONE;
>  
>  	if (status & HV_INT_PENDING)
> -		tasklet_hi_schedule(&chip->hwvol_tq);
> +		tasklet_schedule(&chip->hwvol_tq);
>  
>  	/*
>  	 * ack an assp int if its running
> diff --git a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c
> index b9a06c2..d3350f3 100644
> --- a/sound/pci/mixart/mixart_core.c
> +++ b/sound/pci/mixart/mixart_core.c
> @@ -550,7 +550,7 @@ irqreturn_t snd_mixart_interrupt(int irq, void *dev_id)
>  				mgr->msg_fifo[mgr->msg_fifo_writeptr] = msg;
>  				mgr->msg_fifo_writeptr++;
>  				mgr->msg_fifo_writeptr %= MSG_FIFO_SIZE;
> -				tasklet_hi_schedule(&mgr->msg_taskq);
> +				tasklet_schedule(&mgr->msg_taskq);
>  			}
>  			spin_unlock(&mgr->msg_lock);
>  			break;
> diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
> index 73de6e9..8309d44 100644
> --- a/sound/pci/pcxhr/pcxhr.c
> +++ b/sound/pci/pcxhr/pcxhr.c
> @@ -653,7 +653,7 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
>  					PCXHR_STREAM_STATUS_SCHEDULE_RUN;
>  				snd_pcm_trigger_done(s, subs);
>  			}
> -			tasklet_hi_schedule(&chip->mgr->trigger_taskq);
> +			tasklet_schedule(&chip->mgr->trigger_taskq);
>  		} else {
>  			stream = subs->runtime->private_data;
>  			snd_printdd("Only one Substream %c %d\n",
> diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c
> index 7143259..4a5481f 100644
> --- a/sound/pci/pcxhr/pcxhr_core.c
> +++ b/sound/pci/pcxhr/pcxhr_core.c
> @@ -1213,7 +1213,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
>  		mgr->dsp_time_last = PCXHR_DSP_TIME_INVALID;
>  		
>  		mgr->src_it_dsp = reg;
> -		tasklet_hi_schedule(&mgr->msg_taskq);
> +		tasklet_schedule(&mgr->msg_taskq);
>  	}
>  #ifdef CONFIG_SND_DEBUG_VERBOSE
>  	if (reg & PCXHR_FATAL_DSP_ERR)
> diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
> index e9f0706..1d0eeb1 100644
> --- a/sound/pci/riptide/riptide.c
> +++ b/sound/pci/riptide/riptide.c
> @@ -1754,7 +1754,7 @@ snd_riptide_interrupt(int irq, void *dev_id)
>  		if (IS_EOBIRQ(cif->hwport) || IS_EOSIRQ(cif->hwport) ||
>  		    IS_EOCIRQ(cif->hwport)) {
>  			chip->handled_irqs++;
> -			tasklet_hi_schedule(&chip->riptide_tq);
> +			tasklet_schedule(&chip->riptide_tq);
>  		}
>  		if (chip->rmidi && IS_MPUIRQ(cif->hwport)) {
>  			chip->handled_irqs++;
> diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
> index fdd3be5..44d0c15 100644
> --- a/sound/pci/rme9652/hdsp.c
> +++ b/sound/pci/rme9652/hdsp.c
> @@ -3750,7 +3750,7 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id)
>  		}
>  	}
>  	if (hdsp->use_midi_tasklet && schedule)
> -		tasklet_hi_schedule(&hdsp->midi_tasklet);
> +		tasklet_schedule(&hdsp->midi_tasklet);
>  	return IRQ_HANDLED;
>  }
>  
> diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
> index dc5c4ba..71231cf 100644
> --- a/sound/pci/rme9652/hdspm.c
> +++ b/sound/pci/rme9652/hdspm.c
> @@ -3476,7 +3476,7 @@ static irqreturn_t snd_hdspm_interrupt(int irq, void *dev_id)
>  		schedule = 1;
>  	}
>  	if (schedule)
> -		tasklet_hi_schedule(&hdspm->midi_tasklet);
> +		tasklet_schedule(&hdspm->midi_tasklet);
>  	return IRQ_HANDLED;
>  }
>  
> diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
> index fa4b113..ea903c8 100644
> --- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
> +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
> @@ -41,7 +41,7 @@ irqreturn_t pdacf_interrupt(int irq, void *dev)
>  		if (stat & PDAUDIOCF_IRQOVR)	/* should never happen */
>  			snd_printk(KERN_ERR "PDAUDIOCF SRAM buffer overrun detected!\n");
>  		if (chip->pcm_substream)
> -			tasklet_hi_schedule(&chip->tq);
> +			tasklet_schedule(&chip->tq);
>  		if (!(stat & PDAUDIOCF_IRQAKM))
>  			stat |= PDAUDIOCF_IRQAKM;	/* check rate */
>  	}
> diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
> index 5962e4b..6d9f9b1 100644
> --- a/sound/usb/usbmidi.c
> +++ b/sound/usb/usbmidi.c
> @@ -880,7 +880,7 @@ static void snd_usbmidi_output_trigger(struct snd_rawmidi_substream *substream,
>  				snd_rawmidi_transmit_ack(substream, 1);
>  			return;
>  		}
> -		tasklet_hi_schedule(&port->ep->tasklet);
> +		tasklet_schedule(&port->ep->tasklet);
>  	}
>  }
>  

  reply	other threads:[~2008-11-27 16:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07  0:58 2.6.26.[6|7]-rt11, alsa rawmidi, seq hang Fernando Lopez-Lezcano
2008-11-07  9:12 ` Clemens Ladisch
2008-11-07  9:37   ` Clemens Ladisch
2008-11-07 18:12   ` [alsa-devel] " Fernando Lopez-Lezcano
2008-11-07 18:36     ` Fernando Lopez-Lezcano
2008-11-07 23:12     ` Fernando Lopez-Lezcano
2008-11-08  0:48       ` Fernando Lopez-Lezcano
2008-11-08  1:14         ` Fernando Lopez-Lezcano
2008-11-13 21:01   ` Fernando Lopez-Lezcano
2008-11-13 22:56     ` [alsa-devel] " Fernando Lopez-Lezcano
2008-11-14  0:12       ` [alsa-devel] 2.6.26.[6|7]-rt11, alsa rawmidi, seq hang (tasklet_hi_schedule?) Fernando Lopez-Lezcano
2008-11-14  8:15         ` Clemens Ladisch
2008-11-14  8:46           ` Takashi Iwai
2008-11-14 18:57           ` Fernando Lopez-Lezcano
2008-11-19 11:44             ` Takashi Iwai
2008-11-27 16:50               ` Takashi Iwai [this message]
2008-12-11 11:58                 ` 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=s5hvdu93yfn.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nando@ccrma.Stanford.EDU \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®