All of lore.kernel.org
 help / color / mirror / Atom feed
* Remove xrun debugging?
@ 2006-04-23  4:43 Lee Revell
  2006-04-23  8:51 ` CE
  2006-04-23 15:45 ` Florian Schmidt
  0 siblings, 2 replies; 11+ messages in thread
From: Lee Revell @ 2006-04-23  4:43 UTC (permalink / raw)
  To: alsa-devel

Can the xrun debug feature of ALSA please be removed?  It was obsoleted
long ago by the latency tracing feature of the -rt kernel, and has not
been used to find a bug since 2004.  At this point it's just confusing
to users.

Lee



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23  4:43 Remove xrun debugging? Lee Revell
@ 2006-04-23  8:51 ` CE
  2006-04-23 15:45 ` Florian Schmidt
  1 sibling, 0 replies; 11+ messages in thread
From: CE @ 2006-04-23  8:51 UTC (permalink / raw)
  To: alsa-devel

	So is it even useful in posting to bug reports?  I think part
of the problem is that the only useful docs on xruns I've seen are
either over my understanding or say to turn on xrun debug.


You wrote:

> Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> long ago by the latency tracing feature of the -rt kernel, and has not
> been used to find a bug since 2004.  At this point it's just confusing
> to users.
> 
> Lee


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23  4:43 Remove xrun debugging? Lee Revell
  2006-04-23  8:51 ` CE
@ 2006-04-23 15:45 ` Florian Schmidt
  2006-04-23 16:18   ` Lee Revell
  1 sibling, 1 reply; 11+ messages in thread
From: Florian Schmidt @ 2006-04-23 15:45 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

On Sun, 23 Apr 2006 00:43:24 -0400
Lee Revell <rlrevell@joe-job.com> wrote:

> Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> long ago by the latency tracing feature of the -rt kernel, and has not
> been used to find a bug since 2004.  At this point it's just confusing
> to users.

It still might prove useful for non -rt users. I don't know exactly how
useful, but maybe it's really a documentation bug. Put a note in the
helpfile that much finer debugging can be done with the -rt kernels.

Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 15:45 ` Florian Schmidt
@ 2006-04-23 16:18   ` Lee Revell
  2006-04-23 19:03     ` Florian Schmidt
  2006-04-23 20:56     ` John Rigg
  0 siblings, 2 replies; 11+ messages in thread
From: Lee Revell @ 2006-04-23 16:18 UTC (permalink / raw)
  To: Florian Schmidt; +Cc: alsa-devel

On Sun, 2006-04-23 at 17:45 +0200, Florian Schmidt wrote:
> On Sun, 23 Apr 2006 00:43:24 -0400
> Lee Revell <rlrevell@joe-job.com> wrote:
> 
> > Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> > long ago by the latency tracing feature of the -rt kernel, and has not
> > been used to find a bug since 2004.  At this point it's just confusing
> > to users.
> 
> It still might prove useful for non -rt users. I don't know exactly how
> useful, but maybe it's really a documentation bug. Put a note in the
> helpfile that much finer debugging can be done with the -rt kernels.

I don't think it's useful at all - any bugs that it could have found
were fixed long ago.  I have not seen useful output from it in a year
and a half.

Lee



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 16:18   ` Lee Revell
@ 2006-04-23 19:03     ` Florian Schmidt
  2006-04-24  8:55       ` Jaroslav Kysela
  2006-04-23 20:56     ` John Rigg
  1 sibling, 1 reply; 11+ messages in thread
From: Florian Schmidt @ 2006-04-23 19:03 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

On Sun, 23 Apr 2006 12:18:34 -0400
Lee Revell <rlrevell@joe-job.com> wrote:

> > It still might prove useful for non -rt users. I don't know exactly how
> > useful, but maybe it's really a documentation bug. Put a note in the
> > helpfile that much finer debugging can be done with the -rt kernels.
> 
> I don't think it's useful at all - any bugs that it could have found
> were fixed long ago.  I have not seen useful output from it in a year
> and a half.

That doesn't mean it won't prove useful in the future. But i don't know.
Takashi? Jaroslav?

Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 20:56     ` John Rigg
@ 2006-04-23 20:53       ` Lee Revell
  2006-04-24 12:50         ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Revell @ 2006-04-23 20:53 UTC (permalink / raw)
  To: John Rigg; +Cc: Florian Schmidt, alsa-devel

On Sun, 2006-04-23 at 21:56 +0100, John Rigg wrote:
> On Sun, Apr 23, 2006 at 12:18:34PM -0400, Lee Revell wrote:
> > On Sun, 2006-04-23 at 17:45 +0200, Florian Schmidt wrote:
> > > On Sun, 23 Apr 2006 00:43:24 -0400
> > > Lee Revell <rlrevell@joe-job.com> wrote:
> > > 
> > > > Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> > > > long ago by the latency tracing feature of the -rt kernel, and has not
> > > > been used to find a bug since 2004.  At this point it's just confusing
> > > > to users.
> > > 
> > > It still might prove useful for non -rt users. I don't know exactly how
> > > useful, but maybe it's really a documentation bug. Put a note in the
> > > helpfile that much finer debugging can be done with the -rt kernels.
> > 
> > I don't think it's useful at all - any bugs that it could have found
> > were fixed long ago.  I have not seen useful output from it in a year
> > and a half.
> 
> Not everyone can use the -rt kernel. Last time I tried it there were still
> issues with x86_64 SMP (multiple single CPUs, not dual chip). Admittedly
> this was a couple of months ago, but on my dual Opteron I'm still running 
> vanilla 2.6.14.4.

The latency tracer is available as a separate patch against the mainline
kernel.

Lee



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 16:18   ` Lee Revell
  2006-04-23 19:03     ` Florian Schmidt
@ 2006-04-23 20:56     ` John Rigg
  2006-04-23 20:53       ` Lee Revell
  1 sibling, 1 reply; 11+ messages in thread
From: John Rigg @ 2006-04-23 20:56 UTC (permalink / raw)
  To: Lee Revell; +Cc: Florian Schmidt, alsa-devel

On Sun, Apr 23, 2006 at 12:18:34PM -0400, Lee Revell wrote:
> On Sun, 2006-04-23 at 17:45 +0200, Florian Schmidt wrote:
> > On Sun, 23 Apr 2006 00:43:24 -0400
> > Lee Revell <rlrevell@joe-job.com> wrote:
> > 
> > > Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> > > long ago by the latency tracing feature of the -rt kernel, and has not
> > > been used to find a bug since 2004.  At this point it's just confusing
> > > to users.
> > 
> > It still might prove useful for non -rt users. I don't know exactly how
> > useful, but maybe it's really a documentation bug. Put a note in the
> > helpfile that much finer debugging can be done with the -rt kernels.
> 
> I don't think it's useful at all - any bugs that it could have found
> were fixed long ago.  I have not seen useful output from it in a year
> and a half.

Not everyone can use the -rt kernel. Last time I tried it there were still
issues with x86_64 SMP (multiple single CPUs, not dual chip). Admittedly
this was a couple of months ago, but on my dual Opteron I'm still running 
vanilla 2.6.14.4.

John


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 19:03     ` Florian Schmidt
@ 2006-04-24  8:55       ` Jaroslav Kysela
  2006-04-24 10:42         ` Martin Habets
  2006-04-24 12:47         ` Takashi Iwai
  0 siblings, 2 replies; 11+ messages in thread
From: Jaroslav Kysela @ 2006-04-24  8:55 UTC (permalink / raw)
  To: Florian Schmidt; +Cc: Lee Revell, alsa-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 815 bytes --]

On Sun, 23 Apr 2006, Florian Schmidt wrote:

> On Sun, 23 Apr 2006 12:18:34 -0400
> Lee Revell <rlrevell@joe-job.com> wrote:
> 
> > > It still might prove useful for non -rt users. I don't know exactly how
> > > useful, but maybe it's really a documentation bug. Put a note in the
> > > helpfile that much finer debugging can be done with the -rt kernels.
> > 
> > I don't think it's useful at all - any bugs that it could have found
> > were fixed long ago.  I have not seen useful output from it in a year
> > and a half.
> 
> That doesn't mean it won't prove useful in the future. But i don't know.
> Takashi? Jaroslav?

I think that we can make the code optional for now. Patch for review is 
attached.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3368 bytes --]

diff -r a3bd04093933 core/Kconfig
--- a/core/Kconfig	Fri Apr 21 17:29:37 2006 +0200
+++ b/core/Kconfig	Mon Apr 24 10:53:37 2006 +0200
@@ -171,3 +171,13 @@ config SND_DEBUG_DETECT
 	help
 	  Say Y here to enable extra-verbose log messages printed when
 	  detecting devices.
+
+config SND_PCM_XRUN_DEBUG
+	bool "Enable PCM ring buffer overrun/underrun debugging"
+	default n
+	depends on SND_PCM && SND_DEBUG
+	help
+	  Say Y to enable the PCM ring buffer overrun/underrun debugging.
+	  It is no usually required, but if you have trouble with
+	  sound clicking when system is loaded, it may help to determine
+	  the process or driver which causes the scheduling gaps.
diff -r a3bd04093933 core/pcm.c
--- a/core/pcm.c	Fri Apr 21 17:29:37 2006 +0200
+++ b/core/pcm.c	Mon Apr 24 10:53:37 2006 +0200
@@ -436,7 +436,7 @@ static void snd_pcm_substream_proc_statu
 	snd_iprintf(buffer, "appl_ptr    : %ld\n", runtime->control->appl_ptr);
 }
 
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry,
 				    struct snd_info_buffer *buffer)
 {
@@ -480,7 +480,7 @@ static int snd_pcm_stream_proc_init(stru
 	}
 	pstr->proc_info_entry = entry;
 
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 	if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug",
 						pstr->proc_root)) != NULL) {
 		entry->c.text.read_size = 64;
@@ -501,7 +501,7 @@ static int snd_pcm_stream_proc_init(stru
 
 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr)
 {
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 	if (pstr->proc_xrun_debug_entry) {
 		snd_info_unregister(pstr->proc_xrun_debug_entry);
 		pstr->proc_xrun_debug_entry = NULL;
diff -r a3bd04093933 core/pcm_lib.c
--- a/core/pcm_lib.c	Fri Apr 21 17:29:37 2006 +0200
+++ b/core/pcm_lib.c	Mon Apr 24 10:53:37 2006 +0200
@@ -130,7 +130,7 @@ static void xrun(struct snd_pcm_substrea
 static void xrun(struct snd_pcm_substream *substream)
 {
 	snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 	if (substream->pstr->xrun_debug) {
 		snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n",
 			   substream->pcm->card->number,
@@ -204,7 +204,7 @@ static inline int snd_pcm_update_hw_ptr_
 	delta = hw_ptr_interrupt - new_hw_ptr;
 	if (delta > 0) {
 		if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 			if (runtime->periods > 1 && substream->pstr->xrun_debug) {
 				snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
 				if (substream->pstr->xrun_debug > 1)
@@ -249,7 +249,7 @@ int snd_pcm_update_hw_ptr(struct snd_pcm
 	delta = old_hw_ptr - new_hw_ptr;
 	if (delta > 0) {
 		if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
-#ifdef CONFIG_SND_DEBUG
+#ifdef CONFIG_SND_PCM_XRUN_DEBUG
 			if (runtime->periods > 2 && substream->pstr->xrun_debug) {
 				snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2);
 				if (substream->pstr->xrun_debug > 1)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-24  8:55       ` Jaroslav Kysela
@ 2006-04-24 10:42         ` Martin Habets
  2006-04-24 12:47         ` Takashi Iwai
  1 sibling, 0 replies; 11+ messages in thread
From: Martin Habets @ 2006-04-24 10:42 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel

On Mon, Apr 24, 2006 at 10:55:02AM +0200, Jaroslav Kysela wrote:
> On Sun, 23 Apr 2006, Florian Schmidt wrote:
> 
> > On Sun, 23 Apr 2006 12:18:34 -0400
> > Lee Revell <rlrevell@joe-job.com> wrote:
> > 
> > > > It still might prove useful for non -rt users. I don't know exactly how
> > > > useful, but maybe it's really a documentation bug. Put a note in the
> > > > helpfile that much finer debugging can be done with the -rt kernels.
> > > 
> > > I don't think it's useful at all - any bugs that it could have found
> > > were fixed long ago.  I have not seen useful output from it in a year
> > > and a half.
> > 
> > That doesn't mean it won't prove useful in the future. But i don't know.
> > Takashi? Jaroslav?
> 
> I think that we can make the code optional for now. Patch for review is 
> attached.

I think this is a good approach. I do expect there are still bugs out there
in non-x86 land, and this code would be usefull for that.

Jaroslav, a small typo in your additions:
-	  It is no usually required, but if you have trouble with
+	  It is usually not required, but if you have trouble with

Thanks,
Martin


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-24  8:55       ` Jaroslav Kysela
  2006-04-24 10:42         ` Martin Habets
@ 2006-04-24 12:47         ` Takashi Iwai
  1 sibling, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2006-04-24 12:47 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Florian Schmidt, Lee Revell, alsa-devel

At Mon, 24 Apr 2006 10:55:02 +0200 (CEST),
Jaroslav Kysela wrote:
> 
> diff -r a3bd04093933 core/Kconfig
> --- a/core/Kconfig	Fri Apr 21 17:29:37 2006 +0200
> +++ b/core/Kconfig	Mon Apr 24 10:53:37 2006 +0200
> @@ -171,3 +171,13 @@ config SND_DEBUG_DETECT
>  	help
>  	  Say Y here to enable extra-verbose log messages printed when
>  	  detecting devices.
> +
> +config SND_PCM_XRUN_DEBUG
> +	bool "Enable PCM ring buffer overrun/underrun debugging"
> +	default n
> +	depends on SND_PCM && SND_DEBUG
> +	help
> +	  Say Y to enable the PCM ring buffer overrun/underrun debugging.
> +	  It is no usually required, but if you have trouble with
> +	  sound clicking when system is loaded, it may help to determine
> +	  the process or driver which causes the scheduling gaps.

The dependency on SND_PCM should be removed.  Otherwise this option
won't be shown until a card driver with PCM support is chosen because 
CONFIG_SND_PCM is not a selection item by user but will be selected by
the card driver.


Takashi


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Remove xrun debugging?
  2006-04-23 20:53       ` Lee Revell
@ 2006-04-24 12:50         ` Takashi Iwai
  0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2006-04-24 12:50 UTC (permalink / raw)
  To: Lee Revell; +Cc: John Rigg, Florian Schmidt, alsa-devel

At Sun, 23 Apr 2006 16:53:55 -0400,
Lee Revell wrote:
> 
> On Sun, 2006-04-23 at 21:56 +0100, John Rigg wrote:
> > On Sun, Apr 23, 2006 at 12:18:34PM -0400, Lee Revell wrote:
> > > On Sun, 2006-04-23 at 17:45 +0200, Florian Schmidt wrote:
> > > > On Sun, 23 Apr 2006 00:43:24 -0400
> > > > Lee Revell <rlrevell@joe-job.com> wrote:
> > > > 
> > > > > Can the xrun debug feature of ALSA please be removed?  It was obsoleted
> > > > > long ago by the latency tracing feature of the -rt kernel, and has not
> > > > > been used to find a bug since 2004.  At this point it's just confusing
> > > > > to users.
> > > > 
> > > > It still might prove useful for non -rt users. I don't know exactly how
> > > > useful, but maybe it's really a documentation bug. Put a note in the
> > > > helpfile that much finer debugging can be done with the -rt kernels.
> > > 
> > > I don't think it's useful at all - any bugs that it could have found
> > > were fixed long ago.  I have not seen useful output from it in a year
> > > and a half.
> > 
> > Not everyone can use the -rt kernel. Last time I tried it there were still
> > issues with x86_64 SMP (multiple single CPUs, not dual chip). Admittedly
> > this was a couple of months ago, but on my dual Opteron I'm still running 
> > vanilla 2.6.14.4.
> 
> The latency tracer is available as a separate patch against the mainline
> kernel.

But you still have to modify the kernel core itself.  It's a hard
work for many users.

I think it's enough to make the relevant code selective via kernel
config like Jaroslav's patch.
Remember that the XRUN stack-trace is disabled as default (you have to
turn it on via proc file), and the code size you'll save is small,
anyway. 


Takashi


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-04-24 12:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-23  4:43 Remove xrun debugging? Lee Revell
2006-04-23  8:51 ` CE
2006-04-23 15:45 ` Florian Schmidt
2006-04-23 16:18   ` Lee Revell
2006-04-23 19:03     ` Florian Schmidt
2006-04-24  8:55       ` Jaroslav Kysela
2006-04-24 10:42         ` Martin Habets
2006-04-24 12:47         ` Takashi Iwai
2006-04-23 20:56     ` John Rigg
2006-04-23 20:53       ` Lee Revell
2006-04-24 12:50         ` Takashi Iwai

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.