Commit 6cd8dedc authored by Tejun Heo's avatar Tejun Heo

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: default avatarTejun Heo <tj@kernel.org>
parent a585042f
...@@ -170,34 +170,28 @@ int freeze_kernel_threads(void) ...@@ -170,34 +170,28 @@ int freeze_kernel_threads(void)
return error; return error;
} }
static void thaw_tasks(bool nosig_only) void thaw_processes(void)
{ {
struct task_struct *g, *p; struct task_struct *g, *p;
oom_killer_enable();
printk("Restarting tasks ... ");
thaw_workqueues();
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
do_each_thread(g, p) { do_each_thread(g, p) {
if (!freezable(p)) if (!freezable(p))
continue; continue;
if (nosig_only && should_send_signal(p))
continue;
if (cgroup_freezing_or_frozen(p)) if (cgroup_freezing_or_frozen(p))
continue; continue;
__thaw_task(p); __thaw_task(p);
} while_each_thread(g, p); } while_each_thread(g, p);
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
}
void thaw_processes(void)
{
oom_killer_enable();
printk("Restarting tasks ... ");
thaw_workqueues();
thaw_tasks(true);
thaw_tasks(false);
schedule(); schedule();
printk("done.\n"); printk("done.\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment