public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Luming Yu <luming.yu@intel.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Robert Moore <robert.moore@intel.com>,
	Alex Williamson <alex.williamson@hp.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	ACPI Developers <acpi-devel@lists.sourceforge.net>
Subject: Re: Userspace ACPI interpreter ( was RE: [ACPI] [RFC] dev_acpi: support for userspace access to acpi)
Date: 29 Oct 2004 00:48:14 -0400	[thread overview]
Message-ID: <1099025292.5402.200.camel@d845pe> (raw)
In-Reply-To: <20041028152404.GB7902@thunk.org>

Re: why would we want a user-space interpreter?

I don't see any strong reasons.  This is sort of an indulgent "what if"
topic...

Sure page-able memory is better to use than locked down kernel memory. 
Indeed, if the target system doesn't support ACPI at all, then we could
free all of ACPI's memory (static sizes listed below).  But this
configuration is becoming less common over time, not more common.
And if you've got a tiny system w/o ACPI, you'd probably just build with
CONFIG_ACPI=n rather than running a general-purpose ACPI-enabled kernel.

[ It would be sort of neat if we could built the core ACPI support in
some kind of modular way such that that we could have it at boot-time,
if we need it, but optionally unload it at run-time if it turned out the
target system didn't need it. ]

I suppose that a crash in the kernel-mode-interpreter would kill the
system.  But I'm not aware of any such failures today and we fix those
pretty quickly when they do happen.  From a high-level view, however,
Luming's simplicity=stability argument has some merit when you add in
things like memory leaks, stack overflows and all the other system
killing things that could potentially happen in the kernel.

In the kernel we currently have an issue running AML with interrupts off
-- can't do it b/c arbitrary AML could require allocating memory and
sleeping.  But this issue probably has a solution and by itself doesn't
justify a user-land interpreter.

One could argue that the _policy_ drivers -- the modules listed below
should live in user-space because they implement policy.  This, however,
is a philosophical, rather than practical, argument.


Re: why would we NOT want a user-space interpreter?

We need one in the kernel to boot the system anyway, so why have two?

Synchronization and concurrency in the kernel is well controlled.

No issues with AML accessing arbitrary ports and addresses when running
in the kernel.

-Len

---

CONFIG_ACPI_DEBUG=n

Loadable Module Sizes:
   text    data     bss     dec     hex filename
   1072     324       4    1400     578 drivers/acpi/ac.o
   8511    1624      20   10155    27ab drivers/acpi/asus_acpi.o
   5227     216       4    5447    1547 drivers/acpi/battery.o
   2006     452      16    2474     9aa drivers/acpi/button.o
    956     216       4    1176     498 drivers/acpi/fan.o
   9714    1057     372   11143    2b87 drivers/acpi/ibm_acpi.o
   9465    1012     128   10605    296d drivers/acpi/processor.o
   5891     868       8    6767    1a6f drivers/acpi/thermal.o
   3044      72      20    3136     c40 drivers/acpi/toshiba_acpi.o
   7824    1348       4    9176    23d8 drivers/acpi/video.o

Static Kernel Size:
   text    data     bss     dec     hex filename
 144533    5608    4920  155061   25db5 drivers/acpi/built-in.o


CONFIG_ACPI_DEBUG=y

   text    data     bss     dec     hex filename
   2234     356       4    2594     a22 drivers/acpi/ac.o
   8511    1624      20   10155    27ab drivers/acpi/asus_acpi.o
   7686     248       4    7938    1f02 drivers/acpi/battery.o
   3420     484      16    3920     f50 drivers/acpi/button.o
   1886     248       4    2138     85a drivers/acpi/fan.o
  18508    1044     128   19680    4ce0 drivers/acpi/processor.o
  11119     868       8   11995    2edb drivers/acpi/thermal.o
   3044      72      20    3136     c40 drivers/acpi/toshiba_acpi.o

Static Kernel Size:
   text    data     bss     dec     hex filename
 282285    6636    5112  294033   47c91 drivers/acpi/built-in.o

  reply	other threads:[~2004-10-29  4:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-28  4:04 Userspace ACPI interpreter ( was RE: [ACPI] [RFC] dev_acpi: support for userspace access to acpi) Yu, Luming
2004-10-28  5:37 ` Len Brown
     [not found]   ` <418085B0.30208-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2004-10-28 15:24     ` Userspace ACPI interpreter ( was " Theodore Ts'o
2004-10-29  4:48       ` Len Brown [this message]
2004-10-29  4:58         ` Andi Kleen
2004-10-28 15:18 ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2004-10-29  2:51 Yu, Luming
2004-10-31 21:29 ` Userspace ACPI interpreter ( was RE: [ACPI] " Pavel Machek

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=1099025292.5402.200.camel@d845pe \
    --to=len.brown@intel.com \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=alex.williamson@hp.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luming.yu@intel.com \
    --cc=robert.moore@intel.com \
    --cc=tytso@mit.edu \
    /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