PM / Freezer: Remove references to TIF_FREEZE in comments
authorMarcos Paulo de Souza <marcos.mage@gmail.com>
Tue, 21 Feb 2012 22:57:47 +0000 (23:57 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 4 Mar 2012 22:08:54 +0000 (23:08 +0100)
This patch removes all the references in the code about the TIF_FREEZE
flag removed by commit a3201227f803ad7fd43180c5195dbe5a2bf998aa

    freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE

There still are some references to TIF_FREEZE in
Documentation/power/freezing-of-tasks.txt, but it looks like that
documentation needs more thorough work to reflect how the new
freezer works, and hence merely removing the references to TIF_FREEZE
won't really help. So I have not touched that part in this patch.

Suggested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
kernel/exit.c
kernel/freezer.c
kernel/power/process.c

index 294b1709170d1e890c80d064c65d38c1b12a88c1..fd0af05e06390bd0fceff91e407b250765f2ba01 100644 (file)
@@ -424,7 +424,7 @@ void daemonize(const char *name, ...)
         */
        exit_mm(current);
        /*
-        * We don't want to have TIF_FREEZE set if the system-wide hibernation
+        * We don't want to get frozen, in case system-wide hibernation
         * or suspend transition begins right now.
         */
        current->flags |= (PF_NOFREEZE | PF_KTHREAD);
index 9815b8d1eed5536e312c561a0c066578e359bd51..11f82a4d4eae07b4d98595852ea50dcf1c028a6b 100644 (file)
@@ -99,9 +99,9 @@ static void fake_signal_wake_up(struct task_struct *p)
  * freeze_task - send a freeze request to given task
  * @p: task to send the request to
  *
- * If @p is freezing, the freeze request is sent by setting %TIF_FREEZE
- * flag and either sending a fake signal to it or waking it up, depending
- * on whether it has %PF_FREEZER_NOSIG set.
+ * If @p is freezing, the freeze request is sent either by sending a fake
+ * signal (if it's not a kernel thread) or waking it up (if it's a kernel
+ * thread).
  *
  * RETURNS:
  * %false, if @p is not freezing or already frozen; %true, otherwise
index 6aeb5efe00ebe8a5c1eea1360078cede0e6fa2ad..0d2aeb2261082f52d4ead619f352f03c03c35001 100644 (file)
@@ -53,11 +53,9 @@ static int try_to_freeze_tasks(bool user_only)
                         * It is "frozen enough".  If the task does wake
                         * up, it will immediately call try_to_freeze.
                         *
-                        * Because freeze_task() goes through p's
-                        * scheduler lock after setting TIF_FREEZE, it's
-                        * guaranteed that either we see TASK_RUNNING or
-                        * try_to_stop() after schedule() in ptrace/signal
-                        * stop sees TIF_FREEZE.
+                        * Because freeze_task() goes through p's scheduler lock, it's
+                        * guaranteed that TASK_STOPPED/TRACED -> TASK_RUNNING
+                        * transition can't race with task state testing here.
                         */
                        if (!task_is_stopped_or_traced(p) &&
                            !freezer_should_skip(p))