[pm] Re: JFFS2 swsusp / signal cleanup.

From: Pavel Machek
Date: Wed Oct 08 2003 - 19:24:18 EST


Hi!

> > Should I do recalc_sigpending() instead of flush_signals(current)?
>
> Yes. You can do that unconditionally, too -- no need to do it depending
> on an argument from the caller.

Yes, and it actually works that way. Good.

[Patrick, this patch is probably good idea, flush_signals has
potential to loose some signal].

[flag argument can be killed, but I guess its bad idea to do it now].

Pavel

--- tmp/linux/kernel/power/process.c 2003-08-27 12:00:53.000000000 +0200
+++ linux/kernel/power/process.c 2003-10-05 21:15:21.000000000 +0200
@@ -49,10 +49,7 @@
pr_debug("%s entered refrigerator\n", current->comm);
printk("=");
current->flags &= ~PF_FREEZE;
- if (flag)
- flush_signals(current); /* We have signaled a kernel thread, which isn't normal behaviour
- and that may lead to 100%CPU sucking because those threads
- just don't manage signals. */
+ recalc_sigpending(); /* We sent fake signal, clean it up */
current->flags |= PF_FROZEN;
while (current->flags & PF_FROZEN)
schedule();

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/