<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v3.2.38</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power?h=v3.2.38</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power?h=v3.2.38'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-02T13:37:43Z</updated>
<entry>
<title>ftrace: Disable function tracing during suspend/resume and hibernation, again</title>
<updated>2012-08-02T13:37:43Z</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=701aa1144e7576cc3a6a9858d2f6ce7ba92bdec4'/>
<id>urn:sha1:701aa1144e7576cc3a6a9858d2f6ce7ba92bdec4</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: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Hibernate/thaw fixes/improvements</title>
<updated>2012-07-25T03:11:19Z</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=6ed6791a1697afcb1615b4252d0c304a743b5f4d'/>
<id>urn:sha1:6ed6791a1697afcb1615b4252d0c304a743b5f4d</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;
</content>
</entry>
<entry>
<title>PM / Hibernate: fix the number of pages used for hibernate/thaw buffering</title>
<updated>2012-05-11T12:14:48Z</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=e0791b5ffb456aa7de29391297e5dc93c1d123ff'/>
<id>urn:sha1:e0791b5ffb456aa7de29391297e5dc93c1d123ff</id>
<content type='text'>
commit f8262d476823a7ea1eb497ff9676d1eab2393c75 upstream.

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;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Enable usermodehelpers in hibernate() error path</title>
<updated>2012-04-02T16:53:03Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-02-17T22:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b952bf66061416f9da18ce8ff54d01808220480'/>
<id>urn:sha1:4b952bf66061416f9da18ce8ff54d01808220480</id>
<content type='text'>
commit 05b4877f6a4f1ba4952d1222213d262bf8c132b7 upstream.

If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
before returning. Fix this. And while at it, reword the goto labels so that
they look more meaningful.

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: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path</title>
<updated>2012-02-13T19:16:56Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-02-01T21:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=695cb013a3332b6c773c8a75be97aa6f91bc227f'/>
<id>urn:sha1:695cb013a3332b6c773c8a75be97aa6f91bc227f</id>
<content type='text'>
commit fe9161db2e6053da21e4649d77bbefaf3030b11d upstream.

In the SNAPSHOT_CREATE_IMAGE ioctl, if the call to hibernation_snapshot()
fails, the frozen tasks are not thawed.

And in the case of success, if we happen to exit due to a successful freezer
test, all tasks (including those of userspace) are thawed, whereas actually
we should have thawed only the kernel threads at that point. Fix both these
issues.

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: Thaw processes in SNAPSHOT_CREATE_IMAGE ioctl test path</title>
<updated>2012-02-13T19:16:56Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2011-12-01T21:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26b67a54a31d8e18f66f52d6bae4907963648d3c'/>
<id>urn:sha1:26b67a54a31d8e18f66f52d6bae4907963648d3c</id>
<content type='text'>
commit 97819a26224f019e73d88bb2fd4eb5a614860461 upstream.

Commit 2aede851ddf08666f68ffc17be446420e9d2a056 (PM / Hibernate: Freeze
kernel threads after preallocating memory) moved the freezing of kernel
threads to hibernation_snapshot() function.

So now, if the call to hibernation_snapshot() returns early due to a
successful hibernation test, the caller has to thaw processes to ensure
that the system gets back to its original state.

But in SNAPSHOT_CREATE_IMAGE hibernation ioctl, the caller does not thaw
processes in case hibernation_snapshot() returned due to a successful
freezer test. Fix this issue. But note we still send the value of 'in_suspend'
(which is now 0) to userspace, because we are not in an error path per-se,
and moreover, the value of in_suspend correctly depicts the situation here.

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 s2disk regression related to freezing workqueues</title>
<updated>2012-02-13T19:16:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-01-29T19:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d483054fe4c66eeb7a03fdc97519b07edb1dc803'/>
<id>urn:sha1:d483054fe4c66eeb7a03fdc97519b07edb1dc803</id>
<content type='text'>
commit 181e9bdef37bfcaa41f3ab6c948a2a0d60a268b5 upstream.

Commit 2aede851ddf08666f68ffc17be446420e9d2a056

  PM / Hibernate: Freeze kernel threads after preallocating memory

introduced a mechanism by which kernel threads were frozen after
the preallocation of hibernate image memory to avoid problems with
frozen kernel threads not responding to memory freeing requests.
However, it overlooked the s2disk code path in which the
SNAPSHOT_CREATE_IMAGE ioctl was run directly after SNAPSHOT_FREE,
which caused freeze_workqueues_begin() to BUG(), because it saw
that worqueues had been already frozen.

Although in principle this issue might be addressed by removing
the relevant BUG_ON() from freeze_workqueues_begin(), that would
reintroduce the very problem that commit 2aede851ddf08666f68ffc17be4
attempted to avoid into that particular code path.  For this reason,
to fix the issue at hand, introduce thaw_kernel_threads() and make
the SNAPSHOT_FREE ioctl execute it.

Special thanks to Srivatsa S. Bhat for detailed analysis of the
problem.

Reported-and-tested-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Hibernate: Do not leak memory in error/test code paths</title>
<updated>2011-11-23T20:03:38Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-11-22T22:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb58dd5d1ffad6c2d21c69698ba766dad4ae54e6'/>
<id>urn:sha1:bb58dd5d1ffad6c2d21c69698ba766dad4ae54e6</id>
<content type='text'>
The hibernation core code forgets to release memory preallocated
for hibernation if there's an error in its early stages or if test
modes causing hibernation_snapshot() to return early are used.  This
causes the system to be hardly usable, because the amount of
preallocated memory is usually huge.  Fix this problem.

Reported-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>PM / Suspend: Fix bug in suspend statistics update</title>
<updated>2011-11-19T13:37:57Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2011-11-19T13:37:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=501a708f18ef911328ffd39f39738b8a7862aa8e'/>
<id>urn:sha1:501a708f18ef911328ffd39f39738b8a7862aa8e</id>
<content type='text'>
After commit 2a77c46de1e3dace73745015635ebbc648eca69c
(PM / Suspend: Add statistics debugfs file for suspend to RAM)
a missing pair of braces inside the state_store() function causes even
invalid arguments to suspend to be wrongly treated as failed suspend
attempts. Fix this.

[rjw: Put the hash/subject of the buggy commit into the changelog.]

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;
</content>
</entry>
<entry>
<title>PM / Hibernate: Fix the early termination of test modes</title>
<updated>2011-11-18T22:02:42Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2011-11-18T22:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aa9a7b11821e883a7b93ecce190881e0ea48648b'/>
<id>urn:sha1:aa9a7b11821e883a7b93ecce190881e0ea48648b</id>
<content type='text'>
Commit 2aede851ddf08666f68ffc17be446420e9d2a056
(PM / Hibernate: Freeze kernel threads after preallocating memory)
postponed the freezing of kernel threads to after preallocating memory
for hibernation. But while doing that, the hibernation test TEST_FREEZER
and the test mode HIBERNATION_TESTPROC were not moved accordingly.

As a result, when using these test modes, it only goes upto the freezing of
userspace and exits, when in fact it should go till the complete end of task
freezing stage, namely the freezing of kernel threads as well.

So, move these points of exit to appropriate places so that freezing of
kernel threads is also tested while using these test harnesses.

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;
</content>
</entry>
</feed>
