diff options
author | Li Fei <fei.li@intel.com> | 2013-02-01 08:56:03 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-09 22:32:48 +0100 |
commit | 957d1282bb8c07e682e142b9237cd9fcb8348a0b (patch) | |
tree | a9b5690066c3268e7971c363b34f1a5deb664e2e /include/linux/freezer.h | |
parent | 89a22dadb8810983868f5bbbc5530b27bf714a60 (diff) | |
download | linux-stable-957d1282bb8c07e682e142b9237cd9fcb8348a0b.tar.gz linux-stable-957d1282bb8c07e682e142b9237cd9fcb8348a0b.tar.bz2 linux-stable-957d1282bb8c07e682e142b9237cd9fcb8348a0b.zip |
suspend: enable freeze timeout configuration through sys
At present, the value of timeout for freezing is 20s, which is
meaningless in case that one thread is frozen with mutex locked
and another thread is trying to lock the mutex, as this time of
freezing will fail unavoidably.
And if there is no new wakeup event registered, the system will
waste at most 20s for such meaningless trying of freezing.
With this patch, the value of timeout can be configured to smaller
value, so such meaningless trying of freezing will be aborted in
earlier time, and later freezing can be also triggered in earlier
time. And more power will be saved.
In normal case on mobile phone, it costs real little time to freeze
processes. On some platform, it only costs about 20ms to freeze
user space processes and 10ms to freeze kernel freezable threads.
Signed-off-by: Liu Chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Li Fei <fei.li@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/freezer.h')
-rw-r--r-- | include/linux/freezer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index e4238ceaa4d6..e70df40d84f6 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -13,6 +13,11 @@ extern bool pm_freezing; /* PM freezing in effect */ extern bool pm_nosig_freezing; /* PM nosig freezing in effect */ /* + * Timeout for stopping processes + */ +extern unsigned int freeze_timeout_msecs; + +/* * Check if a process has been frozen */ static inline bool frozen(struct task_struct *p) |