<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v3.4.84</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power?h=v3.4.84</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power?h=v3.4.84'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-02-20T18:45:33Z</updated>
<entry>
<title>PM / Hibernate: Hibernate/thaw fixes/improvements</title>
<updated>2014-02-20T18:45:33Z</updated>
<author>
<name>Bojan Smojver</name>
<email>bojan@rexursive.com</email>
</author>
<published>2012-04-29T20:42:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b249f99c023402a192e1af812326c5092e64175f'/>
<id>urn:sha1:b249f99c023402a192e1af812326c5092e64175f</id>
<content type='text'>
commit 5a21d489fd9541a4a66b9a500659abaca1b19a51 upstream.

 1. Do not allocate memory for buffers from emergency pools, unless
    absolutely required. Do not warn about and do not retry non-essential
    failed allocations.

 2. Do not check the amount of free pages left on every single page
    write, but wait until one map is completely populated and then check.

 3. Set maximum number of pages for read buffering consistently, instead
    of inadvertently depending on the size of the sector type.

 4. Fix copyright line, which I missed when I submitted the hibernation
    threading patch.

 5. Dispense with bit shifting arithmetic to improve readability.

 6. Really recalculate the number of pages required to be free after all
    allocations have been done.

 7. Fix calculation of pages required for read buffering. Only count in
    pages that do not belong to high memory.

Signed-off-by: Bojan Smojver &lt;bojan@rexursive.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / hibernate: Avoid overflow in hibernate_preallocate_memory()</title>
<updated>2013-12-04T18:50:31Z</updated>
<author>
<name>Aaron Lu</name>
<email>aaron.lu@intel.com</email>
</author>
<published>2013-11-06T00:41:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7094547c201149598a2bd90ef7f04d477dffae1b'/>
<id>urn:sha1:7094547c201149598a2bd90ef7f04d477dffae1b</id>
<content type='text'>
commit fd432b9f8c7c88428a4635b9f5a9c6e174df6e36 upstream.

When system has a lot of highmem (e.g. 16GiB using a 32 bits kernel),
the code to calculate how much memory we need to preallocate in
normal zone may cause overflow. As Leon has analysed:

 It looks that during computing 'alloc' variable there is overflow:
 alloc = (3943404 - 1970542) - 1978280 = -5418 (signed)
 And this function goes to err_out.

Fix this by avoiding that overflow.

References: https://bugzilla.kernel.org/show_bug.cgi?id=60817
Reported-and-tested-by: Leon Drugi &lt;eyak@wp.pl&gt;
Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ftrace: Disable function tracing during suspend/resume and hibernation, again</title>
<updated>2012-08-09T15:31:29Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-06-16T13:30:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3dd392851e014c90ce9e26d03a93188840a5a0b'/>
<id>urn:sha1:d3dd392851e014c90ce9e26d03a93188840a5a0b</id>
<content type='text'>
commit 443772d408a25af62498793f6f805ce3c559309a upstream.

If function tracing is enabled for some of the low-level suspend/resume
functions, it leads to triple fault during resume from suspend, ultimately
ending up in a reboot instead of a resume (or a total refusal to come out
of suspended state, on some machines).

This issue was explained in more detail in commit f42ac38c59e0a03d (ftrace:
disable tracing for suspend to ram). However, the changes made by that commit
got reverted by commit cbe2f5a6e84eebb (tracing: allow tracing of
suspend/resume &amp; hibernation code again). So, unfortunately since things are
not yet robust enough to allow tracing of low-level suspend/resume functions,
suspend/resume is still broken when ftrace is enabled.

So fix this by disabling function tracing during suspend/resume &amp; hibernation.

Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Hibernate: fix the number of pages used for hibernate/thaw buffering</title>
<updated>2012-04-24T21:53:28Z</updated>
<author>
<name>Bojan Smojver</name>
<email>bojan@rexursive.com</email>
</author>
<published>2012-04-24T21:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8262d476823a7ea1eb497ff9676d1eab2393c75'/>
<id>urn:sha1:f8262d476823a7ea1eb497ff9676d1eab2393c75</id>
<content type='text'>
Hibernation regression fix, since 3.2.

Calculate the number of required free pages based on non-high memory
pages only, because that is where the buffers will come from.

Commit 081a9d043c983f161b78fdc4671324d1342b86bc introduced a new buffer
page allocation logic during hibernation, in order to improve the
performance. The amount of pages allocated was calculated based on total
amount of pages available, although only non-high memory pages are
usable for this purpose. This caused hibernation code to attempt to over
allocate pages on platforms that have high memory, which led to hangs.

Signed-off-by: Bojan Smojver &lt;bojan@rexursive.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@suse.de&gt;
</content>
</entry>
<entry>
<title>PM / QoS: add pm_qos_update_request_timeout() API</title>
<updated>2012-03-28T21:31:24Z</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2012-03-28T21:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4772d192c70b61d52262b0db76f7abd8aeb51c6'/>
<id>urn:sha1:c4772d192c70b61d52262b0db76f7abd8aeb51c6</id>
<content type='text'>
The new API, pm_qos_update_request_timeout() is to provide a timeout
with pm_qos_update_request.

For example, pm_qos_update_request_timeout(req, 100, 1000), means that
QoS request on req with value 100 will be active for 1000 microseconds.
After 1000 microseconds, the QoS request thru req is reset. If there
were another pm_qos_update_request(req, x) during the 1000 us, this
new request with value x will override as this is another request on the
same req handle. A new request on the same req handle will always
override the previous request whether it is the conventional request or
it is the new timeout request.

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Mark Gross &lt;markgross@thegnar.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Mitigate race between the freezer and request_firmware()</title>
<updated>2012-03-28T21:30:28Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-03-28T21:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=247bc03742545fec2f79939a3b9f738392a0f7b4'/>
<id>urn:sha1:247bc03742545fec2f79939a3b9f738392a0f7b4</id>
<content type='text'>
There is a race condition between the freezer and request_firmware()
such that if request_firmware() is run on one CPU and
freeze_processes() is run on another CPU and usermodehelper_disable()
called by it succeeds to grab umhelper_sem for writing before
usermodehelper_read_trylock() called from request_firmware()
acquires it for reading, the request_firmware() will fail and
trigger a WARN_ON() complaining that it was called at a wrong time.
However, in fact, it wasn't called at a wrong time and
freeze_processes() simply happened to be executed simultaneously.

To avoid this race, at least in some cases, modify
usermodehelper_read_trylock() so that it doesn't fail if the
freezing of tasks has just started and hasn't been completed yet.
Instead, during the freezing of tasks, it will try to freeze the
task that has called it so that it can wait until user space is
thawed without triggering the scary warning.

For this purpose, change usermodehelper_disabled so that it can
take three different values, UMH_ENABLED (0), UMH_FREEZING and
UMH_DISABLED.  The first one means that usermode helpers are
enabled, the last one means "hard disable" (i.e. the system is not
ready for usermode helpers to be used) and the second one
is reserved for the freezer.  Namely, when freeze_processes() is
started, it sets usermodehelper_disabled to UMH_FREEZING which
tells usermodehelper_read_trylock() that it shouldn't fail just
yet and should call try_to_freeze() if woken up and cannot
return immediately.  This way all freezable tasks that happen
to call request_firmware() right before freeze_processes() is
started and lose the race for umhelper_sem with it will be
frozen and will sleep until thaw_processes() unsets
usermodehelper_disabled.  [For the non-freezable callers of
request_firmware() the race for umhelper_sem against
freeze_processes() is unfortunately unavoidable.]

Reported-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PM / Sleep: Move disabling of usermode helpers to the freezer</title>
<updated>2012-03-28T21:30:21Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-03-28T21:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e73203cd1157a03facc41ffb54050f5b28e55bd'/>
<id>urn:sha1:1e73203cd1157a03facc41ffb54050f5b28e55bd</id>
<content type='text'>
The core suspend/hibernation code calls usermodehelper_disable() to
avoid race conditions between the freezer and the starting of
usermode helpers and each code path has to do that on its own.
However, it is always called right before freeze_processes()
and usermodehelper_enable() is always called right after
thaw_processes().  For this reason, to avoid code duplication and
to make the connection between usermodehelper_disable() and the
freezer more visible, make freeze_processes() call it and remove the
direct usermodehelper_disable() and usermodehelper_enable() calls
from all suspend/hibernation code paths.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PM / Hibernate: Disable usermode helpers right before freezing tasks</title>
<updated>2012-03-28T21:30:14Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-03-28T21:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b5179ac14dbad945647ac9e76bbbf14ed9e0dbe'/>
<id>urn:sha1:7b5179ac14dbad945647ac9e76bbbf14ed9e0dbe</id>
<content type='text'>
There is no reason to call usermodehelper_disable() before creating
memory bitmaps in hibernate() and software_resume(), so call it right
before freeze_processes(), in accordance with the other suspend and
hibernation code.  Consequently, call usermodehelper_enable() right
after the thawing of tasks rather than after freeing the memory
bitmaps.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'pm-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2012-03-21T17:15:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-21T17:15:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7c66c0cb0c77b1a8edf09bca57d922312d58030'/>
<id>urn:sha1:c7c66c0cb0c77b1a8edf09bca57d922312d58030</id>
<content type='text'>
Pull power management updates for 3.4 from Rafael Wysocki:
 "Assorted extensions and fixes including:

  * Introduction of early/late suspend/hibernation device callbacks.
  * Generic PM domains extensions and fixes.
  * devfreq updates from Axel Lin and MyungJoo Ham.
  * Device PM QoS updates.
  * Fixes of concurrency problems with wakeup sources.
  * System suspend and hibernation fixes."

* tag 'pm-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (43 commits)
  PM / Domains: Check domain status during hibernation restore of devices
  PM / devfreq: add relation of recommended frequency.
  PM / shmobile: Make MTU2 driver use pm_genpd_dev_always_on()
  PM / shmobile: Make CMT driver use pm_genpd_dev_always_on()
  PM / shmobile: Make TMU driver use pm_genpd_dev_always_on()
  PM / Domains: Introduce "always on" device flag
  PM / Domains: Fix hibernation restore of devices, v2
  PM / Domains: Fix handling of wakeup devices during system resume
  sh_mmcif / PM: Use PM QoS latency constraint
  tmio_mmc / PM: Use PM QoS latency constraint
  PM / QoS: Make it possible to expose PM QoS latency constraints
  PM / Sleep: JBD and JBD2 missing set_freezable()
  PM / Domains: Fix include for PM_GENERIC_DOMAINS=n case
  PM / Freezer: Remove references to TIF_FREEZE in comments
  PM / Sleep: Add more wakeup source initialization routines
  PM / Hibernate: Enable usermodehelpers in hibernate() error path
  PM / Sleep: Make __pm_stay_awake() delete wakeup source timers
  PM / Sleep: Fix race conditions related to wakeup source timer function
  PM / Sleep: Fix possible infinite loop during wakeup source destruction
  PM / Hibernate: print physical addresses consistently with other parts of kernel
  ...
</content>
</entry>
<entry>
<title>power: remove the second argument of k[un]map_atomic()</title>
<updated>2012-03-20T13:48:26Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-11-25T15:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0de9a1e28a0d005f42c8cc5456a246710133b9ab'/>
<id>urn:sha1:0de9a1e28a0d005f42c8cc5456a246710133b9ab</id>
<content type='text'>
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
</feed>
