public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* AML method concurrency
@ 2007-05-29 20:54 Bjorn Helgaas
  2007-05-30  7:37 ` Alexey Starikovskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2007-05-29 20:54 UTC (permalink / raw)
  To: linux-acpi; +Cc: Len Brown, Moore, Robert

Can AML methods be executed concurrently?

The existence of mutexes, serialized methods, and the Linux
"acpi_serialize" parameter makes me think that in general, we
should be able to execute multiple AML methods concurrently.

However, the ACPI CA Programmer Reference, rev 1.16, section 2.2.5,
says:

  The specification states that at most one control method can be
  actually executing AML code at any given time.  ...  it can be
  said that the specification precludes the concurrent execution
  of control methods.

It is referring to the ACPI specification, but I don't see any
explicit statement there.  I've been pointed to this text from
ACPI 3.0, section 5.5.2:

  Interpretation of a Control Method is not preemptive, but it can
  block.  When a control method does block, the operating software
  can initiate or continue the execution of a different control
  method.

But this doesn't actually say anything about concurrency.

If ACPI does in fact preclude concurrent method execution, can you
point me to discussion of this in the ACPI spec?

Bjorn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AML method concurrency
  2007-05-29 20:54 AML method concurrency Bjorn Helgaas
@ 2007-05-30  7:37 ` Alexey Starikovskiy
  2007-05-30 16:11   ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Starikovskiy @ 2007-05-30  7:37 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-acpi, Len Brown, Moore, Robert

There is a "limited concurrency" in interpreter.
There is a "executor" semaphore(acpi_ex_{enter/exit}_interpreter), which
prevents generic concurrent execution of methods, but in the case of the
method blocking (mutex or sleep) it will be released and reacquired
after, thus allowing some other method to run during block.

Hope that helps,
Alex.

Bjorn Helgaas ?????:
> Can AML methods be executed concurrently?
> 
> The existence of mutexes, serialized methods, and the Linux
> "acpi_serialize" parameter makes me think that in general, we
> should be able to execute multiple AML methods concurrently.
> 
> However, the ACPI CA Programmer Reference, rev 1.16, section 2.2.5,
> says:
> 
>   The specification states that at most one control method can be
>   actually executing AML code at any given time.  ...  it can be
>   said that the specification precludes the concurrent execution
>   of control methods.
> 
> It is referring to the ACPI specification, but I don't see any
> explicit statement there.  I've been pointed to this text from
> ACPI 3.0, section 5.5.2:
> 
>   Interpretation of a Control Method is not preemptive, but it can
>   block.  When a control method does block, the operating software
>   can initiate or continue the execution of a different control
>   method.
> 
> But this doesn't actually say anything about concurrency.
> 
> If ACPI does in fact preclude concurrent method execution, can you
> point me to discussion of this in the ACPI spec?
> 
> Bjorn
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AML method concurrency
  2007-05-30  7:37 ` Alexey Starikovskiy
@ 2007-05-30 16:11   ` Bjorn Helgaas
  2007-05-30 17:27     ` Alexey Starikovskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2007-05-30 16:11 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: linux-acpi, Len Brown, Moore, Robert

On Wednesday 30 May 2007 01:37:40 am Alexey Starikovskiy wrote:
> There is a "limited concurrency" in interpreter.
> There is a "executor" semaphore(acpi_ex_{enter/exit}_interpreter), which
> prevents generic concurrent execution of methods, but in the case of the
> method blocking (mutex or sleep) it will be released and reacquired
> after, thus allowing some other method to run during block.

That's good information on the Intel CA implementation.  Do we know
what other implementations do?

Is there language in the ACPI spec itself that precludes concurrent
execution?

How exactly is the "acpi_serialize" Linux option useful?  If the
ACPI_MTX_INTERPRETER mutex prevents concurrency already, what good
is "acpi_serialize"?

> Bjorn Helgaas ?????:
> > Can AML methods be executed concurrently?
> > 
> > The existence of mutexes, serialized methods, and the Linux
> > "acpi_serialize" parameter makes me think that in general, we
> > should be able to execute multiple AML methods concurrently.
> > 
> > However, the ACPI CA Programmer Reference, rev 1.16, section 2.2.5,
> > says:
> > 
> >   The specification states that at most one control method can be
> >   actually executing AML code at any given time.  ...  it can be
> >   said that the specification precludes the concurrent execution
> >   of control methods.
> > 
> > It is referring to the ACPI specification, but I don't see any
> > explicit statement there.  I've been pointed to this text from
> > ACPI 3.0, section 5.5.2:
> > 
> >   Interpretation of a Control Method is not preemptive, but it can
> >   block.  When a control method does block, the operating software
> >   can initiate or continue the execution of a different control
> >   method.
> > 
> > But this doesn't actually say anything about concurrency.
> > 
> > If ACPI does in fact preclude concurrent method execution, can you
> > point me to discussion of this in the ACPI spec?
> > 
> > Bjorn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AML method concurrency
  2007-05-30 16:11   ` Bjorn Helgaas
@ 2007-05-30 17:27     ` Alexey Starikovskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Starikovskiy @ 2007-05-30 17:27 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-acpi, Len Brown, Moore, Robert

Bjorn Helgaas ?????:
> On Wednesday 30 May 2007 01:37:40 am Alexey Starikovskiy wrote:
>> There is a "limited concurrency" in interpreter.
>> There is a "executor" semaphore(acpi_ex_{enter/exit}_interpreter), which
>> prevents generic concurrent execution of methods, but in the case of the
>> method blocking (mutex or sleep) it will be released and reacquired
>> after, thus allowing some other method to run during block.
> 
> That's good information on the Intel CA implementation.  Do we know
> what other implementations do?
Essentially there is only one _other_ implementation and by some rumors
it was not allowing execution of methods in parallel at all, so
acpi_serialize was introduced to copy that behavior.
> 
> Is there language in the ACPI spec itself that precludes concurrent
> execution?
This spec should be taken with some caution, because the _other_
implementation, on which BIOS vendors _do_ check their code, does not
follow every letter of it... And we could only guess how they choose to
deviate from it in every case.

> 
> How exactly is the "acpi_serialize" Linux option useful?  If the
> ACPI_MTX_INTERPRETER mutex prevents concurrency already, what good
> is "acpi_serialize"?
Without acpi_serialize there is some degree of concurrency, as I
explained earlier. So acpi_serialize does not allow methods to execute
while some method is blocked.
> 
>> Bjorn Helgaas ?????:
>>> Can AML methods be executed concurrently?
>>>
>>> The existence of mutexes, serialized methods, and the Linux
>>> "acpi_serialize" parameter makes me think that in general, we
>>> should be able to execute multiple AML methods concurrently.
>>>
>>> However, the ACPI CA Programmer Reference, rev 1.16, section 2.2.5,
>>> says:
>>>
>>>   The specification states that at most one control method can be
>>>   actually executing AML code at any given time.  ...  it can be
>>>   said that the specification precludes the concurrent execution
>>>   of control methods.
>>>
>>> It is referring to the ACPI specification, but I don't see any
>>> explicit statement there.  I've been pointed to this text from
>>> ACPI 3.0, section 5.5.2:
>>>
>>>   Interpretation of a Control Method is not preemptive, but it can
>>>   block.  When a control method does block, the operating software
>>>   can initiate or continue the execution of a different control
>>>   method.
>>>
>>> But this doesn't actually say anything about concurrency.
>>>
>>> If ACPI does in fact preclude concurrent method execution, can you
>>> point me to discussion of this in the ACPI spec?
>>>
>>> Bjorn
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-30 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29 20:54 AML method concurrency Bjorn Helgaas
2007-05-30  7:37 ` Alexey Starikovskiy
2007-05-30 16:11   ` Bjorn Helgaas
2007-05-30 17:27     ` Alexey Starikovskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox