public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
@ 2006-01-24 23:14 Mattia Dongili
  0 siblings, 0 replies; 8+ messages in thread
From: Mattia Dongili @ 2006-01-24 23:14 UTC (permalink / raw)
  To: linux-acpi, Dmitry Torokhov; +Cc: Mattia Dongili


Hello.

This patch series revamps an old submission[1] from Dmitry Torokhov that
adds support for multiple readers on /proc/acpi/event.

Due to the code reorganization happened in the last 1.5 years I
re-implemented it a little differently introducing a subscription
mechanism to receive events (it might be used in different context
also). driver/acpi/event.c uses it to register a new listener for each
process opening the /proc/acpi/event file.

I was also wondering if this could fit the recent discussion on
"Untangling the sleep hotkey mess"[2] to allow event deliver through
the input subsystem (yes, a proposed solution was the other way around
but this might still be a viable implementation).

[1]: http://marc.theaimsgroup.com/?l=acpi4linux&m=109333066714671&w=2
[2]: sorry, can't find the beginning of the thread
     http://marc.theaimsgroup.com/?l=linux-acpi&m=113676899930391&w=2

Dmitry, I don't know how to apply the signed-off thing correctly here,
in the meantime:

Signed-off-by: Mattia Dongili <malattia@linux.it>


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

* RE: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
@ 2006-01-25  1:17 Brown, Len
  2006-01-25  1:46 ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Brown, Len @ 2006-01-25  1:17 UTC (permalink / raw)
  To: Mattia Dongili, linux-acpi, Dmitry Torokhov

What's the problem with opening a socket to the user-space acpid --
the way multiple readers work today?

thanks,
-Len

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

* Re: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
  2006-01-25  1:17 Brown, Len
@ 2006-01-25  1:46 ` Dmitry Torokhov
  2006-01-25  8:16   ` Mattia Dongili
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2006-01-25  1:46 UTC (permalink / raw)
  To: Brown, Len; +Cc: Mattia Dongili, linux-acpi

On Tuesday 24 January 2006 20:17, Brown, Len wrote:
> What's the problem with opening a socket to the user-space acpid --
> the way multiple readers work today?
>

- one does not want to use current implementation of acpid?
- one does not want to depend on having acpid running before
  starting snooping acpi events?
- because allowing multiple readers is a "right thing to do"?

... just to name a few advantages.

-- 
Dmitry

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

* RE: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
@ 2006-01-25  5:09 Brown, Len
  2006-01-25  5:23 ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Brown, Len @ 2006-01-25  5:09 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Mattia Dongili, linux-acpi

 
>On Tuesday 24 January 2006 20:17, Brown, Len wrote:
>> What's the problem with opening a socket to the user-space acpid --
>> the way multiple readers work today?
>>
>
>- one does not want to use current implementation of acpid?

What is better?

>- one does not want to depend on having acpid running before
>  starting snooping acpi events?

For example?

>- because allowing multiple readers is a "right thing to do"?

This is not self-evident, can you give some examples?

The argument against, I suppose, is simply why to add code
to the kernel when the same feature is already working
in user-space?

The other argument against is why enhance an interface when
perhaps we should instead consider replacing it altogether...

>> Dmitry, I don't know how to apply the signed-off thing correctly here,

If Dmitry is the original author, then the proper format is to put

From: Dmitry Torokhov <dtor_core@ameritech.net>

at start of the body of the message where it can over-ride the e-mail author.
This is documented in Documentation/SubmittingPatches.

thanks,
-Len

ps. I'm not trying to be difficult about this, but would like to
give this (recurring) proposal the attention it deserves and either
accept it or reject it once and for all.


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

* Re: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
  2006-01-25  5:09 [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event Brown, Len
@ 2006-01-25  5:23 ` Dmitry Torokhov
  2006-01-25  9:54   ` Mattia Dongili
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2006-01-25  5:23 UTC (permalink / raw)
  To: Brown, Len; +Cc: Mattia Dongili, linux-acpi

On Wednesday 25 January 2006 00:09, Brown, Len wrote:
> 
> >On Tuesday 24 January 2006 20:17, Brown, Len wrote:
> >> What's the problem with opening a socket to the user-space acpid --
> >> the way multiple readers work today?
> >>
> >
> >- one does not want to use current implementation of acpid?
> 
> What is better?
> 

Probably nothing at the moment. It does not mean that every program
out there must mimic "legacy" acpid to provice concurrent access
to ACPI events.

> >- one does not want to depend on having acpid running before
> >  starting snooping acpi events?
> 
> For example?

You must ensure that nothing gets to /proc/acpi/events before acpid,
otherwise it won't be able to access it screwing up your system
state.

> 
> >- because allowing multiple readers is a "right thing to do"?
> 
> This is not self-evident, can you give some examples?

"I am trying to read from /proc/acpi/events and there is nothing there"
types of questions on various mailing lists come to my mind.

> 
> The argument against, I suppose, is simply why to add code
> to the kernel when the same feature is already working
> in user-space?
> 

If you remember original code (without registering multiple in-kernel
listeners) I think it was more compact that what is in the kernel
at the moment. Also IIRC current in kernel code may start filling memory
if acpid stops reading events for some reason.

For the record I think multiple listeners are not needed since the only
possible user is input layer and I firmly believe that ACPI should report
keys/buttons using input layer natively so userspace can get uniform
notification of "Sleep" button being pressed no matter whther that button
is controlled by ACPI or it is just another key on USB keyboard.

> The other argument against is why enhance an interface when
> perhaps we should instead consider replacing it altogether...
> 
> >> Dmitry, I don't know how to apply the signed-off thing correctly here,
> 
> If Dmitry is the original author, then the proper format is to put
> 
> From: Dmitry Torokhov <dtor_core@ameritech.net>
> 
> at start of the body of the message where it can over-ride the e-mail author.
> This is documented in Documentation/SubmittingPatches.
>

I'd say it is only valid if original patch is mostly intact. If it was
heavily reworked/enhanced I think mentioning the original author in
description is fine but authorship belongs the person who reworked the
code. Just IMHO.

-- 
Dmitry

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

* Re: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
  2006-01-25  1:46 ` Dmitry Torokhov
@ 2006-01-25  8:16   ` Mattia Dongili
  0 siblings, 0 replies; 8+ messages in thread
From: Mattia Dongili @ 2006-01-25  8:16 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Brown, Len, linux-acpi

On Wed, January 25, 2006 2:46 am, Dmitry Torokhov said:
> On Tuesday 24 January 2006 20:17, Brown, Len wrote:
>> What's the problem with opening a socket to the user-space acpid --
>> the way multiple readers work today?
>>
>
> - one does not want to use current implementation of acpid?
> - one does not want to depend on having acpid running before
>   starting snooping acpi events?
> - because allowing multiple readers is a "right thing to do"?

One more:
- because acpid disappearing and reappearing at random times causes
useless complexity and troubles to its socket readers?

-- 
mattia
:wq!



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

* Re: [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event
  2006-01-25  5:23 ` Dmitry Torokhov
@ 2006-01-25  9:54   ` Mattia Dongili
  2006-01-26 17:38     ` Thomas Renninger
  0 siblings, 1 reply; 8+ messages in thread
From: Mattia Dongili @ 2006-01-25  9:54 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Brown, Len, linux-acpi

On Wed, January 25, 2006 6:23 am, Dmitry Torokhov said:
> On Wednesday 25 January 2006 00:09, Brown, Len wrote:
[...]
> If you remember original code (without registering multiple in-kernel
> listeners) I think it was more compact that what is in the kernel
> at the moment. Also IIRC current in kernel code may start filling memory
> if acpid stops reading events for some reason.
>
> For the record I think multiple listeners are not needed since the only
> possible user is input layer and I firmly believe that ACPI should report
> keys/buttons using input layer natively so userspace can get uniform
> notification of "Sleep" button being pressed no matter whther that button
> is controlled by ACPI or it is just another key on USB keyboard.

I have no problem changing the implementation to avoid useless stuff if
the patch is going to be considered for acceptance.

>> The other argument against is why enhance an interface when
>> perhaps we should instead consider replacing it altogether...

The same thing has been said at Dmitry's submission (08/2004) and
/proc/acpi/event is still there. :)
Also, removing /proc/acpi/event will take a very long time.
Anyway what would you suggest (if you have already some plan)? I'd like to
try implementing it.

-- 
mattia
:wq!



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

* Re: [PATCH 0/2] Deliver ACPI events upon subscription and      implement multiple readers for /proc/acpi/event
  2006-01-25  9:54   ` Mattia Dongili
@ 2006-01-26 17:38     ` Thomas Renninger
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Renninger @ 2006-01-26 17:38 UTC (permalink / raw)
  To: Mattia Dongili
  Cc: Dmitry Torokhov, Brown, Len, linux-acpi, Robert Love, kasievers

Mattia Dongili wrote:
> On Wed, January 25, 2006 6:23 am, Dmitry Torokhov said:
>> On Wednesday 25 January 2006 00:09, Brown, Len wrote:
> [...]
 > I have no problem changing the implementation to avoid useless stuff if
> the patch is going to be considered for acceptance.
> 
>>> The other argument against is why enhance an interface when
>>> perhaps we should instead consider replacing it altogether...
> 
> The same thing has been said at Dmitry's submission (08/2004) and
> /proc/acpi/event is still there. :)
> Also, removing /proc/acpi/event will take a very long time.
> Anyway what would you suggest (if you have already some plan)? I'd like to
> try implementing it.

What about the dbus-kernel interface?
Acpi events are probably one of the things that should
make use of this one sooner or later?

However I have no idea in which state dbus is on kernel side.

   Thomas

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

end of thread, other threads:[~2006-01-26 17:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25  5:09 [PATCH 0/2] Deliver ACPI events upon subscription and implement multiple readers for /proc/acpi/event Brown, Len
2006-01-25  5:23 ` Dmitry Torokhov
2006-01-25  9:54   ` Mattia Dongili
2006-01-26 17:38     ` Thomas Renninger
  -- strict thread matches above, loose matches on Subject: below --
2006-01-25  1:17 Brown, Len
2006-01-25  1:46 ` Dmitry Torokhov
2006-01-25  8:16   ` Mattia Dongili
2006-01-24 23:14 Mattia Dongili

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