All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH 13/20] sound/gus_pcm: remove
@ 2005-02-02 19:50 Nishanth Aravamudan
  2005-02-04 15:33 ` [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage Takashi Iwai
  2005-02-04 15:33 ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Takashi Iwai
  0 siblings, 2 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-02-02 19:50 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Hello,

Please consider applying.

Description: Replace deprecated interruptible_sleep_on_timeout() with
wait_event_timeout(). Code is not identical, as the current sleeping system is 1
jiffy at a time checking atomic_read()'s return every iteration. Patch is
compile-tested.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc2-kj-v/sound/isa/gus/gus_pcm.c	2005-01-26 11:19:06.000000000 -0800
+++ 2.6.11-rc2-kj/sound/isa/gus/gus_pcm.c	2005-02-02 11:34:20.000000000 -0800
@@ -697,16 +697,10 @@ static int snd_gf1_pcm_playback_close(sn
 	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	gus_pcm_private_t *pcmp = runtime->private_data;
-	unsigned long jiffies_old;
+	
+	if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ))
+		snd_printk("gf1 pcm - serious DMA problem\n");
 
-	jiffies_old = jiffies;
-	while (atomic_read(&pcmp->dma_count) > 0) {
-		interruptible_sleep_on_timeout(&pcmp->sleep, 1);
-		if ((signed long)(jiffies - jiffies_old) > 2*HZ) {
-			snd_printk("gf1 pcm - serious DMA problem\n");
-			break;
-		}
-	}
 	snd_gf1_dma_done(gus);	
 	return 0;
 }

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage
  2005-02-02 19:50 [KJ] [PATCH 13/20] sound/gus_pcm: remove Nishanth Aravamudan
@ 2005-02-04 15:33 ` Takashi Iwai
  2005-02-04 15:33 ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2005-02-04 15:33 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: perex, alsa-devel, kernel-janitors

At Wed, 2 Feb 2005 11:50:13 -0800,
Nishanth Aravamudan wrote:
> 
> Hello,
> 
> Please consider applying.
> 
> Description: Replace deprecated interruptible_sleep_on_timeout() with
> wait_event_timeout(). Code is not identical, as the current sleeping system is 1
> jiffy at a time checking atomic_read()'s return every iteration. Patch is
> compile-tested.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Thanks, I applied this one.

The other fixes for sound/seq/* stuff are not applied.  Instead, I
modified the code to use wait_event*() properly.
Now all sleep_on*() are gone from ALSA tree.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

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

* [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove
@ 2005-02-04 15:33 ` Takashi Iwai
  2005-02-04 17:02   ` [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage Nishanth Aravamudan
  2005-02-04 17:02   ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Nishanth Aravamudan
  0 siblings, 2 replies; 5+ messages in thread
From: Takashi Iwai @ 2005-02-04 15:33 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

At Wed, 2 Feb 2005 11:50:13 -0800,
Nishanth Aravamudan wrote:
> 
> Hello,
> 
> Please consider applying.
> 
> Description: Replace deprecated interruptible_sleep_on_timeout() with
> wait_event_timeout(). Code is not identical, as the current sleeping system is 1
> jiffy at a time checking atomic_read()'s return every iteration. Patch is
> compile-tested.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Thanks, I applied this one.

The other fixes for sound/seq/* stuff are not applied.  Instead, I
modified the code to use wait_event*() properly.
Now all sleep_on*() are gone from ALSA tree.


Takashi

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage
  2005-02-04 15:33 ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Takashi Iwai
@ 2005-02-04 17:02   ` Nishanth Aravamudan
  2005-02-04 17:02   ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Nishanth Aravamudan
  1 sibling, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-02-04 17:02 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: perex, alsa-devel, kernel-janitors

On Fri, Feb 04, 2005 at 04:33:04PM +0100, Takashi Iwai wrote:
> At Wed, 2 Feb 2005 11:50:13 -0800,
> Nishanth Aravamudan wrote:
> > 
> > Hello,
> > 
> > Please consider applying.
> > 
> > Description: Replace deprecated interruptible_sleep_on_timeout() with
> > wait_event_timeout(). Code is not identical, as the current sleeping system is 1
> > jiffy at a time checking atomic_read()'s return every iteration. Patch is
> > compile-tested.
> > 
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> Thanks, I applied this one.
> 
> The other fixes for sound/seq/* stuff are not applied.  Instead, I
> modified the code to use wait_event*() properly.
> Now all sleep_on*() are gone from ALSA tree.

Great! Thanks for all your help, Takashi!

-Nish


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

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

* [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove
  2005-02-04 15:33 ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Takashi Iwai
  2005-02-04 17:02   ` [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage Nishanth Aravamudan
@ 2005-02-04 17:02   ` Nishanth Aravamudan
  1 sibling, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-02-04 17:02 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

On Fri, Feb 04, 2005 at 04:33:04PM +0100, Takashi Iwai wrote:
> At Wed, 2 Feb 2005 11:50:13 -0800,
> Nishanth Aravamudan wrote:
> > 
> > Hello,
> > 
> > Please consider applying.
> > 
> > Description: Replace deprecated interruptible_sleep_on_timeout() with
> > wait_event_timeout(). Code is not identical, as the current sleeping system is 1
> > jiffy at a time checking atomic_read()'s return every iteration. Patch is
> > compile-tested.
> > 
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> Thanks, I applied this one.
> 
> The other fixes for sound/seq/* stuff are not applied.  Instead, I
> modified the code to use wait_event*() properly.
> Now all sleep_on*() are gone from ALSA tree.

Great! Thanks for all your help, Takashi!

-Nish

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2005-02-04 17:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-02 19:50 [KJ] [PATCH 13/20] sound/gus_pcm: remove Nishanth Aravamudan
2005-02-04 15:33 ` [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage Takashi Iwai
2005-02-04 15:33 ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Takashi Iwai
2005-02-04 17:02   ` [PATCH 13/20] sound/gus_pcm: remove interruptible_sleep_on_timeout() usage Nishanth Aravamudan
2005-02-04 17:02   ` [KJ] Re: [Alsa-devel] [PATCH 13/20] sound/gus_pcm: remove Nishanth Aravamudan

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.