From: David Zeuthen <davidz-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pavel Machek <pavel-AlSwsSmVLrQ@public.gmane.org>
Cc: seife-l3A5Bk7waGM@public.gmane.org,
linux-pm <linux-pm-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: suspend/resume uevents [was Re: Introducing HAL userspace power management]
Date: Fri, 11 Mar 2005 11:04:58 -0500 [thread overview]
Message-ID: <1110557099.4203.19.camel@daxter.boston.redhat.com> (raw)
In-Reply-To: <20050311084158.GA1705-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]
On Fri, 2005-03-11 at 09:41 +0100, Pavel Machek wrote:
> On Pá 11-03-05 00:28:55, David Zeuthen wrote:
> > On Fri, 2005-03-11 at 00:07 +0100, Pavel Machek wrote:
> > > > I was merely asking for an event when the system is resumed.
> > > >
> > > > I agree it doesn't make much sense for an event just before the system
> > > > is suspended - if this is needed I believe we can orchestrate it
> > > > completely from user space (things like making your email app
> > > > synchronize etc. comes to mind).
> > >
> > > You can have event when the system is resumed. Just do it in userspace.
> > >
> >
> > Maybe I'm reading the source wrong, but isn't it the case that some
> > laptops using APM (my IBM thinkpad T41 with acpi=off for instance)
> > suspends without user space interaction when the lid is closed, thus
> > rendering it impossible to send the event from user space?
> >
> > One may even ask whether it's sound to assume that all architectures
> > will be suspended via user space?
>
> Some machines will suspend without even telling operating system
> anything.
>
> For APM case, yes some kind of notification makes sense (I thought we
> were talking ACPI/swsusp here).
>
Oh, I thought the kernel was moving towards presenting user space with
an abstract interface much like /sys/power/state; that would definitely
be easier on user space (we don't have to add new code for every PM
framework), but I do understand if you don't want to do this as it have
negative consequences. But at least some form of feature parity across
different PM frameworks would be nice (e.g. if you make APM resume send
an event, do the same for ACPI and PMU) because in many ways user space
do have to design for lowest common denominator when abstracting this.
> > > . I'm *not* going to do that from kernel. But standartizing what needs
> > > to be ran on resume is indeed good idea, and few lines in
> > > Documentation/power/* are probably worth it.
> > >
> >
> > There's a very practical problem of getting all distributions to
> > actually do this.
>
> Where doing it kernel means we have to do it right..
>
I understand that, yes.
> > Another point is that user space may just use a timer and look at the
> > wall clock to determine when a suspend happens, but that's hardly an
> > elegant architecture. It does save some discussion, though, either way
> > I'll be quiet now and leave you guys to do real work :-)
>
> Well, if you propose reasonable way to notify userspace, you can get
> it at least for APM case... So do not drop quiet just now.
I'm not a kernel hacker, sorry, my best bet would be using the
kobject_uevent stuff (since that is used for other notifications) but I
don't really grok all the locking and synchronization needed to do this
right without races / deadlocks.
I was just adding to this thread because Alan asked what user space
would like to see :-)
Cheers,
David
[-- Attachment #2: Type: text/plain, Size: 171 bytes --]
_______________________________________________
linux-pm mailing list
linux-pm-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
http://lists.osdl.org/mailman/listinfo/linux-pm
next prev parent reply other threads:[~2005-03-11 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.0503071125001.1378-100000@ida.rowland.org>
[not found] ` <1110411138.7779.86.camel@daxter.boston.redhat.com>
[not found] ` <20050309233556.GO17034@elf.ucw.cz>
[not found] ` <1110426926.3443.3.camel@daxter.boston.redhat.com>
[not found] ` <20050310095629.GA13444@elf.ucw.cz>
[not found] ` <1110476278.3404.60.camel@daxter.boston.redhat.com>
[not found] ` <20050310211320.GG632@openzaurus.ucw.cz>
[not found] ` <4230BCB9.7070005@suse.de>
[not found] ` <20050310230008.GB10954@elf.ucw.cz>
[not found] ` <42317A81.8050205@suse.de>
[not found] ` <20050311110619.GK1705@elf.ucw.cz>
[not found] ` <4231872F.9040101@suse.de>
[not found] ` <4231872F.9040101-l3A5Bk7waGM@public.gmane.org>
2005-03-11 20:39 ` suspend/resume uevents [was Re: Introducing HAL userspace power management] Nigel Cunningham
[not found] ` <1110490939.3404.84.camel@daxter.boston.redhat.com>
[not found] ` <20050310230745.GC10954@elf.ucw.cz>
[not found] ` <1110518935.4512.14.camel@daxter.boston.redhat.com>
[not found] ` <1110525158.12485.178.camel@localhost.localdomain>
[not found] ` <1110525158.12485.178.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-03-11 15:52 ` David Zeuthen
[not found] ` <20050311084158.GA1705@elf.ucw.cz>
[not found] ` <20050311084158.GA1705-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-11 16:04 ` David Zeuthen [this message]
[not found] ` <1110557099.4203.19.camel-Kbn0pMe1eZsEMMbVNdFDoACJwEvxM/w9@public.gmane.org>
2005-03-11 20:49 ` Nigel Cunningham
[not found] ` <1110574140.32510.12.camel-r49W/1Cwd2ff0s6lnCXPX/uOuaPYTxhvJwvTLr3MMZM@public.gmane.org>
2005-03-12 4:15 ` Greg KH
[not found] ` <20050312041535.GB9671-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2005-03-12 4:25 ` Bernard Blackham
2005-03-12 5:43 ` Nigel Cunningham
[not found] ` <1110519283.3049.51.camel@desktop.cunningham.myip.net.au>
[not found] ` <1110519283.3049.51.camel-r49W/1Cwd2ff0s6lnCXPX/uOuaPYTxhvJwvTLr3MMZM@public.gmane.org>
2005-03-11 20:57 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503111250320.19793-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-11 21:26 ` Nigel Cunningham
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=1110557099.4203.19.camel@daxter.boston.redhat.com \
--to=davidz-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-pm-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=pavel-AlSwsSmVLrQ@public.gmane.org \
--cc=seife-l3A5Bk7waGM@public.gmane.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