login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
May
»
31
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Rafael J. Wysocki
Subject:
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
Date: Wednesday, May 30, 2007 - 10:44 pm
Hi, On Thursday, 31 May 2007 00:24, Nigel Cunningham wrote:
quoted text
> Hi. > > On Wed, 2007-05-30 at 23:11 +0200, Rafael J. Wysocki wrote: > > On Wednesday, 30 May 2007 22:44, Rafael J. Wysocki wrote: > > > Hi, > > > > > > On Wednesday, 30 May 2007 17:37, Pavel Machek wrote: > > > > Hi! > > > > > > > > > +Suspend notifiers > > > > > + (C) 2007 Rafael J. Wysocki <rjw@sisk.pl>, GPL > > > > > + > > > > > +There are some operations that device drivers may want to carry out in their > > > > > +.suspend() routines, but shouldn't, because they can cause the hibernation or > > > > > +suspend to fail. For example, a driver may want to allocate a substantial amount > > > > > +of memory (like 50 MB) in .suspend(), but that shouldn't be done after the > > > > > +swsusp's memory shrinker has run. > > > > > + > > > > > +Also, there may be some operations, that subsystems want to carry out before a > > > > > +hibernation/suspend or after a restore/resume, requiring the system to be fully > > > > > +functional, so the drivers' .suspend() and .resume() routines are not suitable > > > > > +for this purpose. For example, device drivers may want to upload firmware to > > > > > +their devices after a restore from a hibernation image, but they cannot do it by > > > > > +calling request_firmware() from their .resume() routines (user land processes > > > > > +are frozen at this point). The solution may be to load the firmware into > > > > > +memory before processes are frozen and upload it from there in the .resume() > > > > > +routine. Of course, a hibernation notifier may be used for this purpose. > > > > > + > > > > > +The subsystems that have such needs can register suspend notifiers that will be > > > > > +called upon the following events by the suspend core: > > > > > + > > > > > +PM_PRE_FREEZE The system is going to hibernate or suspend, tasks will > > > > > + be frozen immediately > > > > > > > > Hmm, looks like bad idea if we are going to remove freezer from > > > > suspend...? > > > > > > We need PM_PRE_FREEZE anyway and it's a different question whether or not > > > it'll be used for suspend (STR) too. > > > > > > The timing is not the best one, but so far the freezer is in the suspend code > > > path and I need to take this into account. > > > > > > > > +PM_POST_THAW Tasks have just been thawed after a resume or restore > > > > > + from a hibernation image > > > > > + > > > > > +PM_HIBERNATION_PREPARE The system is preparing for hibernation. Tasks have > > > > > + been frozen, memory is going to be freed and devices > > > > > + are going to be suspended. > > > > > > > > Is not PRE_FREEZE enough? We can allocate memory for drivers there, > > > > too... > > > > > > Well, there is a reason for not doing this. Namely, if the memory if freed on > > > PM_POST_HIBERNATION after the image has been created, we can use it for saving > > > the image (and speed up the saving). > > > > > > Besides, if the freezer is dropped from the suspend code, the notifiers will be > > > useful to it anyway IMO, and PRE_FREEZE won't make sense in that case. > > > > > > I think the rule should be: If you need to do something _before_ tasks are > > > frozen, do it in PM_PRE_FREEZE, but if you can do that after the tasks have > > > been frozen, do it on PM_HIBERNATION_PREPARE (or PM_SUSPEND_PREPARE in the > > > suspend case). > > > > OTOH, having considered it for a while, I think that for now I can add just > > PM_PRE_FREEZE and PM_POST_THAW, as I don't have any user for the other ones. > > The other events may be added in the future if need be (along with some users). > > > > I'll post revised patches in a new thread. > > I haven't been giving this much attention, so forgive me if I'm about to > ask a silly question... which notifiers would you see the avenrun > saving/restoring using?
I'm not sure what you mean. Could you please clarify? Greetings, Rafael -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH -mm 0/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Sun May 27, 1:29 pm)
[RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Sun May 27, 1:30 pm)
[RFC][PATCH -mm 2/3] PM: Disable usermode helper before hi ...
, Rafael J. Wysocki
, (Sun May 27, 1:30 pm)
[RFC][PATCH -mm 3/3] PM: Disable _request_firmware before ...
, Rafael J. Wysocki
, (Sun May 27, 1:31 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Sun May 27, 1:45 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Matthew Garrett
, (Sun May 27, 1:49 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Sun May 27, 2:45 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Sun May 27, 2:49 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Sun May 27, 2:55 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Sun May 27, 3:01 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Matthew Garrett
, (Sun May 27, 3:01 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Matthew Garrett
, (Sun May 27, 3:04 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Sun May 27, 3:16 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Mon May 28, 12:43 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Mon May 28, 12:44 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Nigel Cunningham
, (Mon May 28, 1:30 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 1:48 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Mon May 28, 2:06 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Nigel Cunningham
, (Mon May 28, 2:49 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 3:26 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 3:41 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 4:15 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Mon May 28, 4:22 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Mon May 28, 4:24 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Mon May 28, 4:28 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 4:28 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 4:38 am)
Re: [linux-pm] Re: [RFC][PATCH -mm 3/3] PM: Disable _reque ...
, Pavel Machek
, (Mon May 28, 4:45 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Mon May 28, 4:51 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Mon May 28, 5:01 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 5:07 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 5:26 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Kay Sievers
, (Mon May 28, 5:47 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 6:00 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 6:01 am)
Re: [RFC][PATCH -mm 2/3] PM: Disable usermode helper befor ...
, Pavel Machek
, (Mon May 28, 6:04 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 6:07 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Michael-Luke Jones
, (Mon May 28, 6:10 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Pavel Machek
, (Mon May 28, 6:12 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Mon May 28, 8:55 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Alan Stern
, (Mon May 28, 8:56 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Mon May 28, 9:09 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Matthew Garrett
, (Mon May 28, 9:12 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Mon May 28, 9:43 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Matthew Garrett
, (Mon May 28, 9:54 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Mon May 28, 10:26 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Mon May 28, 10:29 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rafael J. Wysocki
, (Mon May 28, 10:43 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Mon May 28, 1:03 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Ray Lee
, (Mon May 28, 1:51 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 1:57 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon May 28, 1:59 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Mon May 28, 3:29 pm)
Re: [linux-pm] Re: [RFC][PATCH -mm 3/3] PM: Disable _reque ...
, David Brownell
, (Tue May 29, 1:09 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rob Landley
, (Tue May 29, 1:41 pm)
Re: [linux-pm] Re: [RFC][PATCH -mm 3/3] PM: Disable _reque ...
, Alan Stern
, (Tue May 29, 1:48 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rob Landley
, (Tue May 29, 2:19 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Tue May 29, 3:24 pm)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Rob Landley
, (Tue May 29, 3:51 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Pavel Machek
, (Wed May 30, 8:37 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Wed May 30, 12:50 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Wed May 30, 1:44 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Wed May 30, 2:11 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Nigel Cunningham
, (Wed May 30, 3:24 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Pavel Machek
, (Wed May 30, 3:29 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Wed May 30, 10:42 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Wed May 30, 10:44 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Pavel Machek
, (Thu May 31, 7:23 am)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Rafael J. Wysocki
, (Thu May 31, 1:02 pm)
Re: [RFC][PATCH -mm 1/3] PM: Hibernation and suspend notifiers
, Nigel Cunningham
, (Thu May 31, 2:56 pm)
[RFC][PATCH -mm 0/2] PM: Hibernation and suspend notifiers ...
, Rafael J. Wysocki
, (Fri Jun 1, 5:41 pm)
[RFC][PATCH -mm 1/2] PM: Introduce hibernation and suspend ...
, Rafael J. Wysocki
, (Fri Jun 1, 5:43 pm)
[RFC][PATCH -mm 2/2] PM: Disable usermode helper before hi ...
, Rafael J. Wysocki
, (Fri Jun 1, 5:44 pm)
Re: [RFC][PATCH -mm 1/2] PM: Introduce hibernation and sus ...
, Pavel Machek
, (Sun Jun 3, 9:41 am)
Re: [RFC][PATCH -mm 2/2] PM: Disable usermode helper befor ...
, Pavel Machek
, (Sun Jun 3, 9:42 am)
Re: [RFC][PATCH -mm 1/2] PM: Introduce hibernation and sus ...
, Rafael J. Wysocki
, (Sun Jun 3, 3:38 pm)
Re: [RFC][PATCH -mm 1/2] PM: Introduce hibernation and sus ...
, Pavel Machek
, (Sun Jun 3, 3:59 pm)
Re: [RFC][PATCH -mm 1/2] PM: Introduce hibernation and sus ...
, Rafael J. Wysocki
, (Mon Jun 4, 12:56 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Mon Jun 4, 4:00 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Alan Stern
, (Tue Jun 5, 11:45 am)
Re: [RFC][PATCH -mm 3/3] PM: Disable _request_firmware bef ...
, Pavel Machek
, (Tue Jun 5, 1:26 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate