RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-29 Thread Chanho Min
> Chanho Min wrote: > > > > > > > On Mon, 26 Nov 2018 06:36:37 +0100, > > > > > Chanho Min wrote: > > > > > > > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non- > atomic > > > > > > PCM > > > > > > stream") fixes deadlock for non-atomic PCM stream. But, This > patch > > > > >

Re: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-28 Thread Takashi Iwai
On Thu, 29 Nov 2018 00:48:20 +0100, Chanho Min wrote: > > > > > On Mon, 26 Nov 2018 06:36:37 +0100, > > > > Chanho Min wrote: > > > > > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic > > > > > PCM > > > > > stream") fixes deadlock for non-atomic PCM stream. But, This

RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-28 Thread Chanho Min
> > > On Mon, 26 Nov 2018 06:36:37 +0100, > > > Chanho Min wrote: > > > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic > > > > PCM > > > > stream") fixes deadlock for non-atomic PCM stream. But, This patch > > > causes antother stuck. > > > > If writer is RT thread and

Re: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-28 Thread Takashi Iwai
On Wed, 28 Nov 2018 00:47:03 +0100, Chanho Min wrote: > > > On Mon, 26 Nov 2018 06:36:37 +0100, > > Chanho Min wrote: > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM > > > stream") fixes deadlock for non-atomic PCM stream. But, This patch > > causes antother stuc

RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-27 Thread Chanho Min
> > > > Hrm, converting unconditionally with msleep() looks too drastic. > > Yes, it looks drastic. But, IMHO, I can't say busy-spin is not non-drastic. Fix typo in this comment: I can't say busy-spin is not drastic. Thanks Chanho

RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-27 Thread Chanho Min
> On Mon, 26 Nov 2018 06:36:37 +0100, > Chanho Min wrote: > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM > > stream") fixes deadlock for non-atomic PCM stream. But, This patch > causes antother stuck. > > If writer is RT thread and reader is a normal thread, the read

Re: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-26 Thread Takashi Iwai
On Mon, 26 Nov 2018 06:36:37 +0100, Chanho Min wrote: > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM > stream") > fixes deadlock for non-atomic PCM stream. But, This patch causes antother > stuck. > If writer is RT thread and reader is a normal thread, the reader thre

[PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-25 Thread Chanho Min
Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream") fixes deadlock for non-atomic PCM stream. But, This patch causes antother stuck. If writer is RT thread and reader is a normal thread, the reader thread will be difficult to get scheduled. It may not give chance to rele

Re: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-25 Thread kbuild test robot
Hi Chanho, I love your patch! Yet something to improve: [auto build test ERROR on sound/for-next] [also build test ERROR on v4.20-rc3 next-20181123] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commi

Re: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-24 Thread kbuild test robot
Hi Chanho, I love your patch! Yet something to improve: [auto build test ERROR on sound/for-next] [also build test ERROR on v4.20-rc3 next-20181123] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commi

[PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-23 Thread Chanho Min
Commit 67ec1072b053 (ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream) fixes deadlock for non-atomic PCM stream. But, This patch causes antother stuck. If writer is RT thread and reader is a normal thread, the reader thread will be difficult to get scheduled. It may not give chance to releas