mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bartłomiej Zimoń" <uzi18@o2.pl>
To: linux-kernel@vger.kernel.org
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [suspend/resume] Re: userspace notification from module
Date: Mon, 04 Jan 2010 00:17:58 +0100	[thread overview]
Message-ID: <2d484a86.2379951a.4b4125a6.e3e58@o2.pl> (raw)

Dnia 3 stycznia 2010 22:29 "Rafael J. Wysocki" <rjw@sisk.pl> napisał(a):
> > > To put it in a different way, you apparently want the kernel to notify the user
> > > space of an event originating from the user space and my question is why not
> > > to set up the user space to generate the notification without relying on the
> > > kernel to do that.
> > 
> > Because now kernel know better what is going on.
> 
> That's because it's just been told by the user space about that.
> 
> Basically, you want something like this to happen:
> 
> process A ->(suspend) kernel
> kernel ->(suspending) process B
> 

Yes.

> where the kernel won't wait for process B to do whatever it has to do before
> suspending.  In my opinion it'd be better to do something like this
> 
> process A ->(suspending) process B
> process B ->(ack) process A
> process A ->(suspend) kernel
> 
> ... 

Please forget for a moment about pm-utils.

I was thinking about sf like this:
pm-notify is registered in pm_notifier_chain or called before pm_notifiers_chain
pm-notify -> (suspending) all registerd processes
some processes ->(ack) pm-notify
to consider - after timeout ( 1s. could be ok) pm-notify will send NOTIFY_OK, kernel will cont. suspending

It could be even UIO module but there are no pm events reachable there?

I cant understand why kernel cant be simple power manager.

Consider this: add one more signal (SIGPREFREEZ, SIGPOSTFREEZ) and send this before/after suspend to processes.
It could be simplest way and we have notified processes.

If pm-notify idea is not clean, we must extend pm-utils or write something new
(with backends dbus, ipc, scripts, ...)
But You see? We still have no information from kernel about events 
(especialy resume) or maybe i dont see this ;/

Thanks for your understanding Rafael :)

Best regards.
Bartłomiej Zimoń
PLD Linux, Kadu Team, FreeRunner user
http://kadu-im.blogspot.com/



             reply	other threads:[~2010-01-03 23:18 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 23:17 Bartłomiej Zimoń [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-03 11:06 Bartłomiej Zimoń
2010-01-03  8:31 Bartłomiej Zimoń
2010-01-02 22:34 Bartłomiej Zimoń
2010-01-02 13:29 Bartłomiej Zimoń
2010-01-02 14:04 ` Daniel Borkmann
2010-01-02 14:27   ` [suspend/resume] " Bartłomiej Zimoń
2010-01-02 15:11     ` Oliver Neukum
     [not found]     ` <6f52f5b81001020713j5435cfadr1143806a9026adc2@mail.gmail.com>
2010-01-02 15:15       ` Daniel Borkmann
2010-01-02 15:40         ` Andy Walls
2010-01-02 15:56           ` Daniel Borkmann
2010-01-02 18:26             ` Bartłomiej Zimoń
2010-01-02 21:01               ` Rafael J. Wysocki
     [not found]                 ` <7cf4f51f.5fc2a5cd.4b3fc3ad.c849c@o2.pl>
2010-01-02 23:29                   ` Rafael J. Wysocki
2010-01-03 17:20                     ` Bartłomiej Zimoń
2010-01-03 21:50                       ` Rafael J. Wysocki
     [not found]                     ` <65e5aef6.33251eb4.4b3fecf4.a2f99@o2.pl>
2010-01-03  9:30                       ` Daniel Borkmann
2010-01-03 10:06                         ` Daniel Borkmann
     [not found]                           ` <43bd3f9d.71702a8b.4b407900.b542@o2.pl>
2010-01-03 21:49                             ` Rafael J. Wysocki
2010-01-04 13:38                               ` Stefan Seyfried
2010-01-03 21:33                         ` Rafael J. Wysocki
2010-01-03 21:29                       ` Rafael J. Wysocki
     [not found]                         ` <24fb84fa.38887c91.4b411ffd.e7f1f@o2.pl>
2010-01-03 23:30                           ` Rafael J. Wysocki
2010-01-03 23:35                             ` Bartłomiej Zimoń
2010-01-03 23:45                               ` Rafael J. Wysocki
2010-01-04  0:51                                 ` Bartłomiej Zimoń
2010-01-04  1:06                                   ` Bartłomiej Zimoń
2010-01-04 19:43                                   ` Rafael J. Wysocki
2010-01-04 12:46                                 ` Daniel Borkmann
2010-01-04 19:45                                   ` Rafael J. Wysocki
2010-01-09 10:32                 ` Pavel Machek
2010-01-09 13:40                   ` Rafael J. Wysocki
2010-01-15 20:03                     ` Pavel Machek
2010-01-15 22:14                       ` Rafael J. Wysocki
2010-01-16  3:00                         ` Eric Miao
2010-01-16 17:00                           ` Stanislav Brabec
2010-01-16 18:12                             ` Pavel Machek
2010-01-16 22:05                               ` Rafael J. Wysocki
2010-01-16 22:19                                 ` Pavel Machek
2010-01-16 22:25                                   ` Pavel Machek
2010-01-16 22:31                                     ` Rafael J. Wysocki
2010-01-16 22:26                                   ` Rafael J. Wysocki
2010-01-17 13:07                                     ` Pavel Machek
2010-01-17 13:26                                       ` Russell King - ARM Linux
2010-01-19  5:15                                         ` Pavel Machek
2010-01-16 22:32                                 ` Russell King - ARM Linux
2010-01-16 18:12                           ` Pavel Machek
2010-01-16 18:12                         ` Pavel Machek
2010-01-16 22:07                           ` Rafael J. Wysocki
2010-01-16 22:14                             ` Pavel Machek
2010-01-16 22:21                               ` Rafael J. Wysocki
2010-01-02 21:20               ` Bartłomiej Zimoń
2010-01-02 14:31   ` Bartłomiej Zimoń

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=2d484a86.2379951a.4b4125a6.e3e58@o2.pl \
    --to=uzi18@o2.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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

all inboxes | Powered by JetHome®