public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-acpi@vger.kernel.org, ibm-acpi@hmh.eng.br
Subject: Re: [RFC] Allow notifications on method execution
Date: Fri, 20 Jun 2008 16:39:41 -0300	[thread overview]
Message-ID: <20080620193941.GC20498@khazad-dum.debian.net> (raw)
In-Reply-To: <20080620152227.GA11828@srcf.ucam.org>

On Fri, 20 Jun 2008, Matthew Garrett wrote:
> Various bits of hardware (some Thinkpads, for example) will execute ACPI 
> methods in response to events but won't generate any notifications. It 
> would be nice to be able to receive notifications on those updates in 
> order to avoid polling. How about something like the following?

No comment on the code itself, but I have some about the whole idea.  If I
missed the point, please explain it to me.

Let me start pointing out that I am not really opposed to your idea, but I'd
like to know if it is the best way to go about it, first.

With such ACPI notifies, you could have HAL do some of the stuff kernel
drivers are doing.  So far so good (well, sort of).

But that is NOT necessarily the best, or even the correct way to do it.  You
could use ACPI "traps" sending events to userspace to know brightness
changed, but the proper way to have those events would be for the backlight
class to send uevents for such stuff, instead.

Remember that if ACPI core sends too much data to userspace directly, we
can't easily fix stuff in the drivers to present a more or less sanitized
view of things to userspace.

So I'd really like to know what you need it for?  What sort of hardware
events you'd like to be notified that thinkpad-acpi is not notifying you
about, for example?

Avoiding polling is ALWAYS a good thing.  But being careful about what you
export to userspace is ALWAYS wise as well.  I believe we can do both.

Even if it means we need to go around fixing half-completed sysfs classes
until they're good enough an API for us and userspace.  rfkill is a prime
example of the effort that might be needed.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2008-06-20 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20 15:22 [RFC] Allow notifications on method execution Matthew Garrett
2008-06-20 19:39 ` Henrique de Moraes Holschuh [this message]
2008-06-20 19:58   ` Matthew Garrett
2008-06-20 22:01     ` Henrique de Moraes Holschuh
2008-06-20 22:13       ` Matthew Garrett
2008-06-20 22:33         ` Henrique de Moraes Holschuh
2008-06-20 22:37           ` Matthew Garrett
2008-06-23  6:56 ` Zhao Yakui
2008-06-23 13:09   ` Henrique de Moraes Holschuh
2008-06-23 13:18     ` Henrique de Moraes Holschuh

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=20080620193941.GC20498@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    /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