From: Pavel Machek <pavel@ucw.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, nigel@suspend2.net,
Ulrich Drepper <drepper@redhat.com>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH -mm] swsusp: freeze user space processes first
Date: Fri, 10 Feb 2006 21:36:37 +0100 [thread overview]
Message-ID: <20060210203636.GA1761@elf.ucw.cz> (raw)
In-Reply-To: <20060205142226.GA20141@elte.hu>
Hi!
> > > then i'd suggest to change the vfork implementation to make this code
> > > freezable. Nothing that userspace does should cause freezing to fail.
> > > If it does, we've designed things incorrectly on the kernel side.
> >
> > Does that also mean we have bugs with signal delivery? If vfork();
> > sleep(100000); causes process to be uninterruptible for few days, it
> > will not be killable and increase load average...
>
> "half-done" vforks are indeed in uninterruptible sleep. They are not
> directly killable, but they are killable indirectly through their
> parent. But yes, in theory it would be cleaner if the vfork code used
> wait_for_completion_interruptible(). It has to be done carefully though,
> for two reasons:
>
> - implementational: use task_lock()/task_unlock() to protect
> p->vfork_done in mm_release() and in do_fork().
>
> - semantical: signals to a vfork-ing parent are defined to be delayed
> to after the child has released the parent/MM.
We could still deliver sigkill and stopping for the freezer, no?
> the (untested) patch below handles issue #1, but doesnt handle issue #2:
> this patch opens up a vfork parent to get interrupted early, with any
> signal.
It seems to fix D state for me, and does not seem to have any ill
effects.
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
prev parent reply other threads:[~2006-02-10 20:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-05 9:14 [PATCH -mm] swsusp: freeze user space processes first Rafael J. Wysocki
2006-02-05 9:38 ` Andrew Morton
2006-02-05 10:34 ` Rafael J. Wysocki
2006-02-05 10:50 ` Ingo Molnar
2006-02-05 11:11 ` Rafael J. Wysocki
2006-02-05 11:18 ` Pavel Machek
2006-02-05 11:39 ` Rafael J. Wysocki
2006-02-05 13:34 ` Rafael J. Wysocki
2006-02-10 20:20 ` vfork makes processes uninterruptible [was Re: [PATCH -mm] swsusp: freeze user space processes first] Pavel Machek
2006-02-05 11:11 ` [PATCH -mm] swsusp: freeze user space processes first Pavel Machek
2006-02-05 14:22 ` Ingo Molnar
2006-02-10 20:36 ` Pavel Machek [this message]
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=20060210203636.GA1761@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nigel@suspend2.net \
--cc=rjw@sisk.pl \
--cc=torvalds@osdl.org \
/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