linux-uconsole/kernel/power
黄涛 c6e6466d05 power: fix lcd resume taking long time with an ongoing file copy
port from msm:
This fixes the issue where LCD takes a long time to come back up
since the execution of backlight on and late_resume works by the
suspend worker thread is delayed due to one (or more) of the
sys_sync calls in early_suspend and suspend paths taking a long
time (sometimes 15sec or more) for the below reported scenario(s):

Scenario 1 (copy with usb connected):
1. plug usb
2. adb shell
3. busybox cp /sdcard/file1 /sdcard/file2 (copy >= 100MB file1
   in sdcard/emmc to file2 in sdcard/emmc)
4. press end key to suspend
5. press end key again and it takes a long time for LCD to come
   back up

Scenario 2 (background copy):
1. plug usb
2. adb shell
3. busybox cp /sdcard/file1 /sdcard/file2 & (copy >= 100MB file1
   in sdcard/emmc to file2 in sdcard/emmc)
4. disconnect usb
5. press end key to suspend
6. press end key again and it takes a long time for LCD to come
   back up

A more common form of Scenario 2 is for the user to just use the
copy function on the UI to copy large file(s).

We address this by moving sys_sync calls to a separate workqueue
and having a timeout polling based mechanism to bail out of suspend
in case of user invoking a wakeup event (like end key press) while
we are waiting for the sys_sync completion at the synchronization
point in suspend worker thread context.
2011-12-28 14:46:00 +08:00
..
block_io.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
console.c vt: introduce and use vt_kmsg_redirect() function 2009-12-15 08:53:28 -08:00
consoleearlysuspend.c consoleearlysuspend: Fix for 2.6.32 2011-06-14 09:08:43 -07:00
earlysuspend.c power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
fbearlysuspend.c PM: earlysuspend: Removing dependence on console. 2011-06-14 09:08:43 -07:00
hibernate.c PM / Hibernate: Update kerneldoc comments in hibernate.c 2011-05-24 23:36:06 +02:00
Kconfig power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
main.c PM: Add user-space wake lock api. 2011-06-14 09:08:42 -07:00
Makefile power: Add option to log time spent in suspend 2011-07-20 15:40:48 -07:00
power.h power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
poweroff.c Input: sysrq - drop tty argument from sysrq ops handlers 2010-08-19 22:07:06 -07:00
process.c power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
snapshot.c PM / Hibernate: Fix free_unnecessary_pages() 2011-07-06 20:15:23 +02:00
suspend.c power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
suspend_test.c PM: Make warning in suspend_test_finish() less likely to happen 2009-10-22 08:23:45 +09:00
suspend_time.c power: Add option to log time spent in suspend 2011-07-20 15:40:48 -07:00
swap.c Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block 2011-01-13 10:45:01 -08:00
user.c PM: Free memory bitmaps if opening /dev/snapshot fails 2011-06-21 23:20:06 +02:00
userwakelock.c PM: Add user-space wake lock api. 2011-06-14 09:08:42 -07:00
wakelock.c power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00