linux-uconsole/kernel
黄涛 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
..
debug Fix common misspellings 2011-03-31 11:26:23 -03:00
events perf: Fix software event overflow 2011-08-04 21:58:35 -07:00
gcov Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
irq revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
power power: fix lcd resume taking long time with an ongoing file copy 2011-12-28 14:46:00 +08:00
time Fix "time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime" to compile on 3.0 2011-11-22 16:49:43 -08:00
trace revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
.gitignore
acct.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
async.c
audit.c netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms 2011-03-03 10:55:40 -08:00
audit.h audit: make functions static 2010-10-30 01:42:19 -04:00
audit_tree.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
audit_watch.c kill path_lookup() 2011-03-14 09:15:23 -04:00
auditfilter.c netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms 2011-03-03 10:55:40 -08:00
auditsc.c audit: acquire creds selectively to reduce atomic op overhead 2011-04-27 15:11:03 +02:00
backtracetest.c
bounds.c memcg: remove direct page_cgroup-to-page pointer 2011-03-23 19:46:28 -07:00
capability.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
cgroup.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
cgroup_freezer.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
compat.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
configs.c
cpu.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
cpuset.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
crash_dump.c crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn 2011-03-23 19:47:19 -07:00
cred.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
extable.c extable, core_kernel_data(): Make sure all archs define _sdata 2011-05-20 08:56:56 +02:00
fork.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
freezer.c Freezer: Use SMP barriers 2011-05-17 23:19:17 +02:00
futex.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
futex_compat.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
groups.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
hrtimer.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
hung_task.c watchdog, hung_task_timeout: Add Kconfig configurable default 2011-04-28 09:13:17 +02:00
irq_work.c irq_work: Use per cpu atomics instead of regular atomics 2010-12-18 15:54:48 +01:00
itimer.c
jump_label.c jump_label: Fix jump_label update for modules 2011-06-29 09:59:17 -04:00
kallsyms.c Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 17:52:22 -07:00
Kconfig.freezer
Kconfig.hz
Kconfig.locks arch:Kconfig.locks Remove unused config option. 2011-04-10 17:01:05 +02:00
Kconfig.preempt
kexec.c PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
kfifo.c
kmod.c KEYS/DNS: Fix ____call_usermodehelper() to not lose the session keyring 2011-06-17 09:40:48 -07:00
kprobes.c Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2011-01-07 17:02:58 -08:00
ksysfs.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
kthread.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
latencytop.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
lockdep.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:01:15 +08:00
lockdep_internals.h
lockdep_proc.c lockdep: Remove unused 'factor' variable from lockdep_stats_show() 2011-03-23 13:54:47 +01:00
lockdep_states.h
Makefile cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
module.c Merge remote-tracking branch 'remotes/aosp/android-3.0' into develop-3.0 2011-10-28 16:07:07 +08:00
mutex-debug.c mutex: Use p->on_cpu for the adaptive spin 2011-04-14 08:52:33 +02:00
mutex-debug.h mutex: Use p->on_cpu for the adaptive spin 2011-04-14 08:52:33 +02:00
mutex.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
mutex.h mutex: Use p->on_cpu for the adaptive spin 2011-04-14 08:52:33 +02:00
notifier.c
nsproxy.c cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
padata.c Fix common misspellings 2011-03-31 11:26:23 -03:00
panic.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
params.c params.c: Use new strtobool function to process boolean inputs 2011-05-19 16:55:28 +09:30
pid.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
pid_namespace.c pidns: call pid_ns_prepare_proc() from create_pid_namespace() 2011-03-23 19:46:58 -07:00
pm_qos_params.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
posix-cpu-timers.c cputimer: Cure lock inversion 2011-10-25 07:10:14 +02:00
posix-timers.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
printk.c Merge remote-tracking branch 'remotes/aosp/android-3.0' into develop-3.0 2011-11-09 13:06:28 +08:00
profile.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
ptrace.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
range.c kernel/range.c: fix clean_sort_range() for the case of full array 2010-11-12 07:55:31 -08:00
rcupdate.c rcu: Use WARN_ON_ONCE for DEBUG_OBJECTS_RCU_HEAD warnings 2011-05-05 23:16:57 -07:00
rcutiny.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
rcutiny_plugin.h rcu: Converge TINY_RCU expedited and normal boosting 2011-05-05 23:16:58 -07:00
rcutorture.c rcu: mark rcutorture boosting callback as being on-stack 2011-05-05 23:16:57 -07:00
rcutree.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
rcutree.h Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
rcutree_plugin.h Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
rcutree_trace.c rcu: use softirq instead of kthreads except when RCU_BOOST=y 2011-06-15 23:07:21 -07:00
relay.c Clean up relay_alloc_page_array() slightly by using vzalloc rather than vmalloc and memset 2010-11-05 08:21:34 -07:00
res_counter.c memcg: res_counter_read_u64(): fix potential races on 32-bit machines 2011-03-23 19:46:22 -07:00
resource.c resource: ability to resize an allocated resource 2011-07-06 10:54:08 -07:00
rtmutex-debug.c rtmutex: Simplify PI algorithm and make highest prio task get lock 2011-01-27 21:13:51 -05:00
rtmutex-debug.h
rtmutex-tester.c rtmutex: tester: Remove the remaining BKL leftovers 2011-02-22 22:07:22 +01:00
rtmutex.c plist: Remove the need to supply locks to plist heads 2011-07-08 14:15:44 -07:00
rtmutex.h
rtmutex_common.h rtmutex: Simplify PI algorithm and make highest prio task get lock 2011-01-27 21:13:51 -05:00
rwsem.c
sched.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
sched_autogroup.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sched_autogroup.h sched, autogroup: Stop going ahead if autogroup is disabled 2011-02-23 11:33:59 +01:00
sched_clock.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
sched_cpupri.c
sched_cpupri.h
sched_debug.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
sched_fair.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
sched_features.h Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
sched_idletask.c Revert "Merge remote branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:24:52 +08:00
sched_rt.c sched/rt: Migrate equal priority tasks to available CPUs 2011-10-16 14:14:51 -07:00
sched_stats.h sched: More sched_domain iterations fixes 2011-05-28 17:02:54 +02:00
sched_stoptask.c sched: Drop the rq argument to sched_class::select_task_rq() 2011-04-14 08:52:36 +02:00
seccomp.c
semaphore.c
signal.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
smp.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
softirq.c Revert "Merge remote-tracking branch 'linux-2.6.32.y/master' into develop" 2011-07-30 16:09:59 +08:00
spinlock.c
srcu.c rcu: demote SRCU_SYNCHRONIZE_DELAY from kernel-parameter status 2011-01-14 04:56:49 -08:00
stacktrace.c
stop_machine.c x86, mtrr: lock stop machine during MTRR rendezvous sequence 2011-08-29 13:29:08 -07:00
sys.c Merge remote-tracking branch 'remotes/aosp/android-3.0' into develop-3.0 2011-11-09 13:06:28 +08:00
sys_ni.c ipc: Add missing sys_ni entries for ipc/compat.c functions 2011-05-20 13:53:02 -07:00
sysctl.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
sysctl_binary.c open-style analog of vfs_path_lookup() 2011-03-14 09:15:28 -04:00
sysctl_check.c Revert "Merge commit 'v2.6.32.9' into android-2.6.32" 2011-07-30 22:24:29 +08:00
taskstats.c taskstats: don't allow duplicate entries in listener mode 2011-06-27 18:00:13 -07:00
test_kprobes.c
time.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-15 18:53:35 -07:00
timeconst.pl
timer.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
tracepoint.c jump label: Introduce static_branch() interface 2011-04-04 12:48:08 -04:00
tsacct.c taskstats: use real microsecond granularity for CPU times 2010-10-27 18:03:17 -07:00
uid16.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
up.c
user-return-notifier.c Fix common misspellings 2011-03-31 11:26:23 -03:00
user.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
user_namespace.c user_ns: improve the user_ns on-the-slab packaging 2011-01-13 08:03:18 -08:00
utsname.c ns proc: Add support for the uts namespace 2011-05-10 14:35:35 -07:00
utsname_sysctl.c
wait.c Fix common misspellings 2011-03-31 11:26:23 -03:00
watchdog.c revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36 2011-10-28 16:02:47 +08:00
workqueue.c workqueue: lock cwq access in drain_workqueue 2011-10-03 11:40:31 -07:00
workqueue_sched.h