[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1320087928-32307-8-git-send-email-tj@kernel.org>
Date: Mon, 31 Oct 2011 12:05:18 -0700
From: Tejun Heo <tj@...nel.org>
To: rjw@...k.pl, paul@...lmenage.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Cc: arnd@...db.de, oleg@...hat.com, matthltc@...ibm.com,
Tejun Heo <tj@...nel.org>
Subject: [PATCH 07/17] freezer: don't distinguish nosig tasks on thaw
There's no point in thawing nosig tasks before others. There's no
ordering requirement between the two groups on thaw, which the staged
thawing can't guarantee anyway. Simplify thaw_processes() by removing
the distinction and collapsing thaw_tasks() into thaw_processes().
This will help further updates to freezer.
Signed-off-by: Tejun Heo <tj@...nel.org>
---
kernel/power/process.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 23822dc..9db048f 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -170,34 +170,28 @@ int freeze_kernel_threads(void)
return error;
}
-static void thaw_tasks(bool nosig_only)
+void thaw_processes(void)
{
struct task_struct *g, *p;
+ oom_killer_enable();
+
+ printk("Restarting tasks ... ");
+
+ thaw_workqueues();
+
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (!freezable(p))
continue;
- if (nosig_only && should_send_signal(p))
- continue;
-
if (cgroup_freezing_or_frozen(p))
continue;
__thaw_task(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
-}
-
-void thaw_processes(void)
-{
- oom_killer_enable();
- printk("Restarting tasks ... ");
- thaw_workqueues();
- thaw_tasks(true);
- thaw_tasks(false);
schedule();
printk("done.\n");
}
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists