LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: vatsa@in.ibm.com, Aneesh Kumar <aneesh.kumar@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Pavel Machek <pavel@ucw.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Gautham R Shenoy <ego@in.ibm.com>
Subject: Re: [RFC][PATCH 1/3] Freezer: Fix vfork problem
Date: Wed, 28 Feb 2007 23:30:28 +0300 [thread overview]
Message-ID: <20070228203028.GA131@tv-sign.ru> (raw)
In-Reply-To: <200702282036.36875.rjw@sisk.pl>
On 02/28, Rafael J. Wysocki wrote:
>
> Okay, I have added a comment to freezer.h. Please have a look.
>
>
> -extern void thaw_some_processes(int all);
> +/*
> + * The PF_FREEZER_SKIP flag should be set by a vfork parent right before it
> + * calls wait_for_completion(&vfork) and reset right after it returns from this
> + * function. Next, the parent should call try_to_freeze() to freeze itself
> + * appropriately in case the child has exited before the freezing of tasks is
> + * complete. However, we don't want kernel threads to be frozen in unexpected
> + * places, so we allow them to block freeze_processes() instead or to set
> + * PF_NOFREEZE if needed and PF_FREEZER_SKIP is only set for userland vfork
> + * parents. Fortunately, in the ____call_usermodehelper() case the parent won't
> + * really block freeze_processes(), since ____call_usermodehelper() (the child)
> + * does a little before exec/exit and it can't be frozen before waking up the
> + * parent.
> + */
I think this comment is accurate and understandable, and I am not suggesting
to change it.
However, please note that PF_FREEZER_SKIP can be used not only for vfork().
For example, it seems to me we can also use freezer_...count() to solve the
problem with coredump. We can use the same "wait_for_completion_freezable"
pattern in exit_mm() and in coredump_wait(). (i do not claim this is a best
fix though).
Oleg.
next prev parent reply other threads:[~2007-02-28 20:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-26 10:39 [RFC][PATCH 0/3] More freezer patches Rafael J. Wysocki
2007-02-26 10:47 ` [RFC][PATCH 1/3] Freezer: Fix vfork problem Rafael J. Wysocki
2007-02-26 12:00 ` Oleg Nesterov
2007-02-26 15:14 ` Srivatsa Vaddagiri
2007-02-26 16:11 ` Oleg Nesterov
2007-02-26 18:28 ` Rafael J. Wysocki
2007-02-26 21:25 ` Oleg Nesterov
2007-02-27 0:31 ` Rafael J. Wysocki
2007-02-27 4:33 ` Aneesh Kumar
2007-02-27 4:42 ` Srivatsa Vaddagiri
2007-02-27 8:37 ` Oleg Nesterov
2007-02-27 21:21 ` Rafael J. Wysocki
2007-02-27 21:53 ` Oleg Nesterov
2007-02-28 1:23 ` Srivatsa Vaddagiri
2007-02-28 10:57 ` Rafael J. Wysocki
2007-02-28 11:00 ` Oleg Nesterov
2007-02-28 19:36 ` Rafael J. Wysocki
2007-02-28 20:30 ` Oleg Nesterov [this message]
2007-02-28 22:34 ` Rafael J. Wysocki
2007-02-28 11:01 ` Srivatsa Vaddagiri
2007-02-26 10:49 ` [RFC][PATCH 2/3] Freezer: Take kernel_execve into consideration Rafael J. Wysocki
2007-02-26 12:45 ` Pavel Machek
2007-02-26 10:52 ` [RFC][PATCH 3/3] Freezer: Prevent ___call_usermodehelper from missing freezing requests Rafael J. Wysocki
2007-02-26 11:52 ` Oleg Nesterov
2007-02-26 11:58 ` Aneesh Kumar
2007-02-26 18:30 ` 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=20070228203028.GA131@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=aneesh.kumar@gmail.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=vatsa@in.ibm.com \
--subject='Re: [RFC][PATCH 1/3] Freezer: Fix vfork problem' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).