linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'Jeff Garzik'" <jgarzik@mandrakesoft.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	"Acpi-linux (E-mail)" <acpi@phobos.fachschaften.tu-muenchen.de>
Subject: RE: ACPI fundamental locking problems
Date: Tue, 3 Jul 2001 11:54:39 -0700	[thread overview]
Message-ID: <4148FEAAD879D311AC5700A0C969E89006CDDF2B@orsmsx35.jf.intel.com> (raw)

> From: Jeff Garzik [mailto:jgarzik@mandrakesoft.com]
> events/evxface.c:610:acpi_acquire_global_lock ->
> events/evmisc.c:337:acpi_ev_acquire_global_lock ->
> include/platform/acgcc.h:52:ACPI_ACQUIRE_GLOBAL_LOCK
> 
> My immediate objections are,
> (a) acgcc.h is re-implementing spinlocks in a non-standard,
> non-portable, and expensive way, and (b) this entire code path is
> incredibly expensive.

Well, when I look at other Linux code, I assume that if it does something
weird, it does it for a reason.

That is the case here. The Global Lock is for synchronizing accesses between
the OS (that's us) and the firmware (SMI). Normal spinlocks are for intra-OS
locking. Here, we're synchronizing access with the BIOS. It's different.

All this code has been working for as long as I can remember.

You mention twice that it is "expensive". Keeping in mind the 80-20 rule, in
what way do you find this code costly?

> But my fundamental objection is,
> we are depending on vendors to get locking right in their 
> ACPI tables. 
> And assume by some magic or design that said locking works 
> with whatever
> unrelated kernel locking is going on.

By design, it works. We get to slipstream Windows a little here in that
vendors need to have a working Global Lock interface to pass WHQL.

> It is my initial belief that a smaller info query interface that can
> parse useful ACPI would be more effective.  For times like
> suspend/resume where we would want to execute control methods, well,
> there's always the disasm -> write-small-driver cycle.  Who knows if
> this is a realistics proposed solution.  But it really scares me to
> depend on vendors to get locking right.

We're depending on vendors (aka the BIOS) for all the ACPI tables, as well
as every other piece of a priori data we need to boot the OS.

Could I please ask that you at least show me a system where this is a
problem before throwing out all the work we've done on ACPI because of this
technical nit?

Thanks -- Regards -- Andy


             reply	other threads:[~2001-07-03 18:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-03 18:54 Grover, Andrew [this message]
2001-07-03 19:08 ` ACPI fundamental locking problems Alan Cox
2001-07-03 19:20 ` Jeff Garzik
2001-07-03 19:39   ` Alan Cox
2001-07-09 22:44     ` Pavel Machek
2001-07-12 21:27       ` Alan Cox
2001-07-09 22:44     ` Pavel Machek
2001-07-03 19:37 ` Dave Jones
2001-07-03 19:37 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2001-07-03 22:01 Grover, Andrew
2001-07-03 21:28 Grover, Andrew
2001-07-03 21:37 ` Alan Cox
2001-07-03 21:53 ` arjan
2001-07-03 17:55 Jeff Garzik
2001-07-03 19:10 ` Johannes Erdfelt

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=4148FEAAD879D311AC5700A0C969E89006CDDF2B@orsmsx35.jf.intel.com \
    --to=andrew.grover@intel.com \
    --cc=acpi@phobos.fachschaften.tu-muenchen.de \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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;
as well as URLs for NNTP newsgroup(s).