Date: Mon, 24 Sep 2007 11:55:56 -0400 From: John Baldwin <jhb@freebsd.org> To: "Jung-uk Kim" <jkim@freebsd.org> Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: [PATCH] OsdSynch.c modernization Message-ID: <200709241155.56926.jhb@freebsd.org> In-Reply-To: <3bbf2fe10709240237u790de351wddb81b0c511d7435@mail.gmail.com> References: <200709181516.11207.jkim@FreeBSD.org> <200709211827.29763.jkim@FreeBSD.org> <3bbf2fe10709240237u790de351wddb81b0c511d7435@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2007/9/22, Jung-uk Kim <jkim@freebsd.org>: > I thought exactly the same when I started rewriting it (almost half > year ago!). I have tried all of the above, spent numerous sleepless > nights, and miserably failed. :-( > > Spin mutex is too restrictive (e.g., it cannot be used with other > locks gracefully). critical_enter() causes: > > panic: blockable sleep lock (sleep mutex) 32 @ > /usr/src/sys/vm/uma_core.c:1830 cpuid = 0 > KDB: enter: panic > [thread pid 21 tid 100013 ] > Stopped at kdb_enter+0x32: leave However, disabling interrupts while you block on other locks is just as bad, we just don't assert for it. Better would be to fix ACPI-CA to not try to malloc() while holding a spin lock. You should be able to see where it is doing that via the stack trace. If the malloc is using M_NOWAIT you will be far better off using a plain mutex and just not disabling interrupts. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709241155.56926.jhb>