From: Rusty Russell <rusty@rustcorp.com.au>
To: Christophe Saout <christophe@saout.de>
Cc: LKML <linux-kernel@vger.kernel.org>, pavel@suse.cz
Subject: Re: kthread, signals and PF_FREEZE (suspend)
Date: Mon, 16 Feb 2004 14:38:22 +1100 [thread overview]
Message-ID: <20040216034251.0912E2C0F8@lists.samba.org> (raw)
In-Reply-To: Your message of "Mon, 16 Feb 2004 01:18:52 BST." <1076890731.5525.31.camel@leto.cs.pocnet.net>
In message <1076890731.5525.31.camel@leto.cs.pocnet.net> you write:
> Hi,
>
> I was wondering, has kthread been tested with the suspend code?
No, it hasn't.
> When trying to freeze the processes the suspend code sets PF_FREEZE on a
> process and calls signal_wake_up(p, 0);
>
> That means that signal_pending() will return true for that process which
> will make kthread stop the thread.
Yes, the way they are currently coded. I had assumed that spurious
signals do not occur.
> The workqueues have PF_IOTHREAD set and I'm only seeing those on my
> machine that's why it doesn't fail.
>
> But the migration threads for example call signal_pending() directly
> after schedule() before checking PF_FREEZE and calling refrigerator()
> (which BTW flushes all signals).
This will only happen on SMP systems with > 1 cpu though? I don't
think suspend works there anyway.
However, ksoftirqd will die I think: that will hurt if lots of irqs
come in.
Pavel, what is the answer here? Should the refrigerator code be in
the kthread infrastructure? Why does the workqueue code set
PF_IOTHREAD?
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2004-02-16 3:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 0:18 kthread, signals and PF_FREEZE (suspend) Christophe Saout
2004-02-16 3:38 ` Rusty Russell [this message]
2004-02-16 9:55 ` Pavel Machek
2004-02-16 13:36 ` Christophe Saout
2004-02-16 16:53 ` Jamie Lokier
2004-02-16 17:12 ` Christophe Saout
2004-02-17 4:44 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040216034251.0912E2C0F8@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=christophe@saout.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox