]> Pileus Git - ~andy/linux/commit
freezer: convert freezable helpers to freezer_do_not_count()
authorColin Cross <ccross@android.com>
Mon, 6 May 2013 23:50:12 +0000 (23:50 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 12 May 2013 12:16:22 +0000 (14:16 +0200)
commitb01235861b84c0f6107d3f9da189c9898fc3caaf
tree2924e7cd5b9f0e5762fd789e8a7abda4e3c0d232
parent613f5d13b569859171f0896fbc73ee0bfa811fda
freezer: convert freezable helpers to freezer_do_not_count()

Freezing tasks will wake up almost every userspace task from
where it is blocking and force it to run until it hits a
call to try_to_sleep(), generally on the exit path from the syscall
it is blocking in.  On resume each task will run again, usually
restarting the syscall and running until it hits the same
blocking call as it was originally blocked in.

Convert the existing wait_event_freezable* wrappers to use
freezer_do_not_count().  Combined with a previous patch,
these tasks will not run during suspend or resume unless they wake
up for another reason, in which case they will run until they hit
the try_to_freeze() in freezer_count(), and then continue processing
the wakeup after tasks are thawed.

This results in a small change in behavior, previously a race
between freezing and a normal wakeup would be won by the wakeup,
now the task will freeze and then handle the wakeup after thawing.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/freezer.h