From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-pm@lists.osdl.org
Cc: Bob YANG <lostleuven04@gmail.com>
Subject: Re: question about process freezing
Date: Mon, 11 Dec 2006 21:33:36 +0100 [thread overview]
Message-ID: <200612112133.36302.rjw@sisk.pl> (raw)
In-Reply-To: <bac9789c0612101805t72dfe5ecyb4cc610955ef55da@mail.gmail.com>
Hi,
On Monday, 11 December 2006 03:05, Bob YANG wrote:
> Hi,
>
> Could anybody explain to me what process freezing is? I mean, what will
> happen to a frozen process? I tried to understand the codes in
> kernel/power/process.c and found one thing freeze_process() does is to set
> PF_FREEZE flag. What is that for?
This is to tell the process to go to the refrigerator.
The function used by processes to check if we want them to go to the
refrigerator is called try_to_freeze() and defined in either sched.h or
freezer.h (in newer kernels). User space processes call try_to_freeze()
in get_signal_to_deliver() and kernel threads (that are freezeable) should
call it explicitly wherever appropriate.
The refrigerator itself is a function defined in process.c. Processes that
enter it set their PF_FROZEN flags and change their states to
TASK_UNINTERRUPTIBLE. They are in this state until we clear the PF_FROZEN
flag for them, in thaw_processes().
Greetings,
Rafael
--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
next prev parent reply other threads:[~2006-12-11 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-11 2:05 question about process freezing Bob YANG
2006-12-11 20:33 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-20 9:11 Question " Franck Bui-Huu
2007-11-20 15:37 ` Alan Stern
2007-11-21 7:46 ` Franck Bui-Huu
2007-11-21 13:58 ` Rafael J. Wysocki
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=200612112133.36302.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.osdl.org \
--cc=lostleuven04@gmail.com \
/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