<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-19T01:15:46Z</updated>
<entry>
<title>Make wait_for_device_probe() also do scsi_complete_async_scans()</title>
<updated>2012-07-19T01:15:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-19T01:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eea03c20ae38a55405c0865ed9adfccc400e4c8e'/>
<id>urn:sha1:eea03c20ae38a55405c0865ed9adfccc400e4c8e</id>
<content type='text'>
Commit a7a20d103994 ("sd: limit the scope of the async probe domain")
make the SCSI device probing run device discovery in it's own async
domain.

However, as a result, the partition detection was no longer synchronized
by async_synchronize_full() (which, despite the name, only synchronizes
the global async space, not all of them).  Which in turn meant that
"wait_for_device_probe()" would not wait for the SCSI partitions to be
parsed.

And "wait_for_device_probe()" was what the boot time init code relied on
for mounting the root filesystem.

Now, most people never noticed this, because not only is it
timing-dependent, but modern distributions all use initrd.  So the root
filesystem isn't actually on a disk at all.  And then before they
actually mount the final disk filesystem, they will have loaded the
scsi-wait-scan module, which not only does the expected
wait_for_device_probe(), but also does scsi_complete_async_scans().

[ Side note: scsi_complete_async_scans() had also been partially broken,
  but that was fixed in commit 43a8d39d0137 ("fix async probe
  regression"), so that same commit a7a20d103994 had actually broken
  setups even if you used scsi-wait-scan explicitly ]

Solve this problem by just moving the scsi_complete_async_scans() call
into wait_for_device_probe().  Everybody who wants to wait for device
probing to finish really wants the SCSI probing to complete, so there's
no reason not to do this.

So now "wait_for_device_probe()" really does what the name implies, and
properly waits for device probing to finish.  This also removes the now
unnecessary extra calls to scsi_complete_async_scans().

Reported-and-tested-by: Artem S. Tashkinov &lt;t.artem@mailcity.com&gt;
Cc: Dan Williams &lt;dan.j.williams@gmail.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: James Bottomley &lt;jbottomley@parallels.com&gt;
Cc: Borislav Petkov &lt;bp@amd64.org&gt;
Cc: linux-scsi &lt;linux-scsi@vger.kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format</title>
<updated>2012-05-18T18:44:59Z</updated>
<author>
<name>Minho Ban</name>
<email>mhban@samsung.com</email>
</author>
<published>2012-05-14T19:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2df83fa4bce421f8176932142f1004adfba0f9dd'/>
<id>urn:sha1:2df83fa4bce421f8176932142f1004adfba0f9dd</id>
<content type='text'>
Sometimes resume= parameter comes in integer style (e.g. major:minor)
and then name_to_dev_t can not detect partition properly. (especially
async device like usb, mmc).

This patch calls get_gendisk() if resumewait is true and resume_file
is in integer format to work around this problem.

Signed-off-by: Minho Ban &lt;mhban@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: User space wakeup sources garbage collector Kconfig option</title>
<updated>2012-05-11T19:11:16Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-05-05T19:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e585d25e120f1eae0a3a8bf8f6ebc7692afec18'/>
<id>urn:sha1:4e585d25e120f1eae0a3a8bf8f6ebc7692afec18</id>
<content type='text'>
Make it possible to configure out the user space wakeup sources
garbage collector for debugging and default Android builds.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Make the limit of user space wakeup sources configurable</title>
<updated>2012-05-11T19:11:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-05-05T19:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c73893e2ca731b4a81ae59246ab57979aa188777'/>
<id>urn:sha1:c73893e2ca731b4a81ae59246ab57979aa188777</id>
<content type='text'>
Make it possible to configure out the check against the limit of
user space wakeup sources for debugging and default Android builds.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Fix a mistake in a conditional in autosleep_store()</title>
<updated>2012-05-05T19:50:58Z</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2012-05-03T22:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=040e5bf65e1ee66266bc314c5965518a7c21ff36'/>
<id>urn:sha1:040e5bf65e1ee66266bc314c5965518a7c21ff36</id>
<content type='text'>
The condition check in autosleep_store() is incorrect and prevents
/sys/power/autosleep from working as advertised.  Fix that.

[rjw: Added the changelog.]

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Add user space interface for manipulating wakeup sources, v3</title>
<updated>2012-05-01T19:26:05Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-04-29T20:53:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b86ff9820fd5df69295273b9aa68e58786ffc23f'/>
<id>urn:sha1:b86ff9820fd5df69295273b9aa68e58786ffc23f</id>
<content type='text'>
Android allows user space to manipulate wakelocks using two
sysfs file located in /sys/power/, wake_lock and wake_unlock.
Writing a wakelock name and optionally a timeout to the wake_lock
file causes the wakelock whose name was written to be acquired (it
is created before is necessary), optionally with the given timeout.
Writing the name of a wakelock to wake_unlock causes that wakelock
to be released.

Implement an analogous interface for user space using wakeup sources.
Add the /sys/power/wake_lock and /sys/power/wake_unlock files
allowing user space to create, activate and deactivate wakeup
sources, such that writing a name and optionally a timeout to
wake_lock causes the wakeup source of that name to be activated,
optionally with the given timeout.  If that wakeup source doesn't
exist, it will be created and then activated.  Writing a name to
wake_unlock causes the wakeup source of that name, if there is one,
to be deactivated.  Wakeup sources created with the help of
wake_lock that haven't been used for more than 5 minutes are garbage
collected and destroyed.  Moreover, there can be only WL_NUMBER_LIMIT
wakeup sources created with the help of wake_lock present at a time.

The data type used to track wakeup sources created by user space is
called "struct wakelock" to indicate the origins of this feature.

This version of the patch includes an rbtree manipulation fix from John Stultz.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources</title>
<updated>2012-05-01T19:25:49Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-04-29T20:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55850945e872531644f31fefd217d61dd15dcab8'/>
<id>urn:sha1:55850945e872531644f31fefd217d61dd15dcab8</id>
<content type='text'>
Android uses one wakelock statistics that is only necessary for
opportunistic sleep.  Namely, the prevent_suspend_time field
accumulates the total time the given wakelock has been locked
while "automatic suspend" was enabled.  Add an analogous field,
prevent_sleep_time, to wakeup sources and make it behave in a similar
way.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Implement opportunistic sleep, v2</title>
<updated>2012-05-01T19:25:38Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-04-29T20:53:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7483b4a4d9abf9dcf1ffe6e805ead2847ec3264e'/>
<id>urn:sha1:7483b4a4d9abf9dcf1ffe6e805ead2847ec3264e</id>
<content type='text'>
Introduce a mechanism by which the kernel can trigger global
transitions to a sleep state chosen by user space if there are no
active wakeup sources.

It consists of a new sysfs attribute, /sys/power/autosleep, that
can be written one of the strings returned by reads from
/sys/power/state, an ordered workqueue and a work item carrying out
the "suspend" operations.  If a string representing the system's
sleep state is written to /sys/power/autosleep, the work item
triggering transitions to that state is queued up and it requeues
itself after every execution until user space writes "off" to
/sys/power/autosleep.

That work item enables the detection of wakeup events using the
functions already defined in drivers/base/power/wakeup.c (with one
small modification) and calls either pm_suspend(), or hibernate() to
put the system into a sleep state.  If a wakeup event is reported
while the transition is in progress, it will abort the transition and
the "system suspend" work item will be queued up again.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Hibernate/thaw fixes/improvements</title>
<updated>2012-05-01T19:24:15Z</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.shady.money/linux/commit/?id=5a21d489fd9541a4a66b9a500659abaca1b19a51'/>
<id>urn:sha1:5a21d489fd9541a4a66b9a500659abaca1b19a51</id>
<content type='text'>
 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;
</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.shady.money/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>
</feed>
