Date: Tue, 05 May 2009 19:51:38 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: John Baldwin <jhb@freebsd.org>, Jung-uk Kim <jkim@freebsd.org> Cc: Alan Amesbury <amesbury@umn.edu>, freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Garbled output from kgdb? Message-ID: <4A006E9A.7060806@icyb.net.ua> In-Reply-To: <4A006D38.50901@icyb.net.ua> References: <49F8B859.7060908@umn.edu> <200905010947.54855.jhb@freebsd.org> <49FB2847.406@umn.edu> <200905011501.40083.jhb@freebsd.org> <4A006D38.50901@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
BTW, this issue seems to be fixed in Jung-uk's acpi patches for newer acpica imports, but it is not fixed both in stable/7 and head. on 05/05/2009 19:45 Andriy Gapon said the following: > on 01/05/2009 22:01 John Baldwin said the following: >> The trace actually ends here. There is nothing super bad here but there is a >> big problem actually in that the idle threads cannot block on a lock, so it is >> a problem for the ACPI code to be acquiring a mutex here. Perhaps the locks >> protecting the idle registers need to use spin locks instead. The problem with >> blocking in the idle thread is that the scheduler assumes (even requires) that >> the idle thread is _always_ runnable. > > > Very interesting! So it seems that we are not having more of such crashes by a > pure luck (low probability)? > > Looking at the method's signature: > ACPI_NATIVE_UINT AcpiOsAcquireLock (ACPI_SPINLOCK Handle) > I think that the name of the parameter type is a big hint. > > Further, looking into ACPICA reference document: >> Wait for and acquire a spin lock. May be called from interrupt handlers, GPE >> handlers, and Fixed event handlers. Single threaded OSL implementations should >> always return AE_OK for this interface. > > P.S. the comment before AcpiOsAcquireLock function (in stable/7 code) seems to be > outdated/bogus too - first of all there is no Flags parameter (it's actualy a > return value "to be used when lock is released") and, second, having ithreads is > no excuse to not care about type of blocking, and the term 'blocking' is used > incorrectly too: > /* > * The Flags parameter seems to state whether or not caller is an ISR > * (and thus can't block) but since we have ithreads, we don't worry > * about potentially blocking. > */ > > -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A006E9A.7060806>