From: Tejun Heo Date: Mon, 21 Nov 2011 20:32:24 +0000 (-0800) Subject: freezer: use dedicated lock instead of task_lock() + memory barrier X-Git-Tag: v3.3-rc1~148^2~24^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c9af09262864a2744091ee94c98c4a8fd60c98b;p=pandora-kernel.git freezer: use dedicated lock instead of task_lock() + memory barrier Freezer synchronization is needlessly complicated - it's by no means a hot path and the priority is staying unintrusive and safe. This patch makes it simply use a dedicated lock instead of piggy-backing on task_lock() and playing with memory barriers. On the failure path of try_to_freeze_tasks(), locking is moved from it to cancel_freezing(). This makes the frozen() test racy but the race here is a non-issue as the warning is printed for tasks which failed to enter frozen for 20 seconds and race on PF_FROZEN at the last moment doesn't change anything. This simplifies freezer implementation and eases further changes including some race fixes. Signed-off-by: Tejun Heo --- Reading git-diff-tree failed