Re: exclusive sleep mutex pcm0 (sound cdev) r = 0

[ Available lists | Index of freebsd-current | Month of Feb 2004 | Week of 24 Feb 2004 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
John Baldwin <jhb@FreeBSD.org>
Date
24 Feb 2004 07:42:19
Subject
Re: exclusive sleep mutex pcm0 (sound cdev) r = 0
Message-ID
200402241043.38696.jhb@FreeBSD.org

In reply to
References to

[ Hide this part ]
On Tuesday 24 February 2004 10:27 am, Don Lewis wrote:
> On 24 Feb, Jun Kuriyama wrote:
> > I got this warning on my current box:
> >
> > malloc() of "256" with the following non-sleepable locks held:
> > exclusive sleep mutex pcm0 (sound cdev) r = 0 (0xc73e63c0) locked @
> > dev/sound/pcm/dsp.c:213
> >
> > I think there is no need to wait in vchan_create(). If kernel does
> > not have resources to return small 256 bytes memory for sound device,
> > we are not in the situation to care whether sound is played correctly
> > or not...
>
> There are a bunch more problems with the "sound cdev" mutex, many of
> which can't be fixed by this type of change unless having sporadic sound
> system failures due to temporary malloc() failures is acceptable.
>
> I currently have some patches for the channel mutexes that are
> undergoing testing. Once these have been committed, I'll take another
> look at the "sound cdev" mutex. My current thought is to convert most
> uses of it to a lockmgr lock.

Eek, why not a sx lock if you must go to a sleepable lock?

--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org


Elapsed time: 0.107 seconds