public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: "Moore, Robert" <robert.moore@intel.com>
Cc: linux-acpi@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	Matthew Wilcox <matthew@wil.cx>,
	Peter Zijlstra <peterz@infradead.org>,
	"Zhao, Yakui" <yakui.zhao@intel.com>,
	Dave Chinner <david@fromorbit.com>, Ingo Molnar <mingo@elte.hu>
Subject: RE: [PATCH 4/5] acpi: remove interpreter lock
Date: Thu, 07 Aug 2008 17:01:36 -0700	[thread overview]
Message-ID: <1218153696.19162.95.camel@localhost.localdomain> (raw)
In-Reply-To: <9D39833986E69849A2A8E74C1078B6B3CE13CB@orsmsx415.amr.corp.intel.com>

On Thu, 2008-08-07 at 14:30 -0700, Moore, Robert wrote:
> Yes, we lock the interpreter for major parts of control method execution
> in order to implement the multithreading model of the ACPI
> specification.
> 
> Here are a couple of sections from the ACPICA programmer reference that
> explain the ACPICA multithreading, control method execution, reentrancy,
> etc.

Thanks for the lengthy response.

> 3.3.2.1	Control Method Blocking
> First of all, how can a control method block? This is a fairly
> exhaustive list of the possibilities:
> 1.	Executes the Sleep() ASL opcode
> 2.	Executes the Acquire() ASL opcode and the request cannot be
> immediately satisfied
> 3.	Executes the Wait() ASL opcode and the request cannot be
> immediately satisfied
> 4.	Attempts to acquire the Global Lock (via Operation Region
> access, etc), but must wait
> 5.	Attempts to execute a control method that is serialized and
> already executing (or is blocked), or has reached its concurrency limit
> 6.	Invokes the host debugger via a write to the debug object or
> executes the BreakPoint() ASL opcode
> 7.	Accesses an Operation Region which results in a dispatch to a
> user-installed handler that blocks on I/O or other long-term operation
> 8.	A Notify AML opcode results in a dispatch to a user-installed
> handler that blocks in a similar way


Ok .. Well it looks like the deadlock that lockdep is warning on is
fixed with #2 or #3 .. If you release the interpreter before sleeping on
an Acquire() ASL opcode then you "fix" the deadlock that could happen by
having different locking orders of the interpreter lock with other
mutexes.

I'm not sure how to train lockdep to understand this tho , Ingo? Peter?
you guys have any thoughts?

I assume it's not safe to remove the interpreter lock given the text
that you quoted?

Daniel


  reply	other threads:[~2008-08-08  0:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 14:59 [PATCH 0/3] acpi: semaphore removal -v2 Daniel Walker
2008-08-07 14:59 ` [PATCH 1/5] add mutex_lock_timeout() Daniel Walker
2008-08-07 14:59   ` [PATCH 2/5] acpi: add real mutex function calls Daniel Walker
2008-08-07 14:59     ` [PATCH 3/5] acpi: add lockdep magic Daniel Walker
2008-08-07 14:59       ` [PATCH 4/5] acpi: remove interpreter lock Daniel Walker
2008-08-07 14:59         ` [PATCH 5/5] acpi: semaphore removal Daniel Walker
2008-08-08  0:34           ` Matthew Wilcox
2008-08-08  1:00             ` Daniel Walker
2008-08-08  1:28             ` Dave Chinner
2008-08-08  2:53               ` Matthew Wilcox
2008-08-08  3:47                 ` Daniel Walker
2008-08-08  2:44           ` Andi Kleen
2008-08-08  3:35             ` Daniel Walker
2008-08-07 20:32         ` [PATCH 4/5] acpi: remove interpreter lock Moore, Robert
2008-08-07 21:09           ` Daniel Walker
2008-08-07 21:30             ` Moore, Robert
2008-08-08  0:01               ` Daniel Walker [this message]
2008-08-08  2:40         ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1218153696.19162.95.camel@localhost.localdomain \
    --to=dwalker@mvista.com \
    --cc=ak@linux.intel.com \
    --cc=david@fromorbit.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=robert.moore@intel.com \
    --cc=yakui.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox