From: Andrew Morton <akpm@linux-foundation.org>
To: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, anton@samba.org, liuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/3] [PATCH i386] during VM oom condition, kill all threads in process group
Date: Thu, 7 Jun 2007 15:34:59 -0700 [thread overview]
Message-ID: <20070607153459.2a1b3230.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070605174831.21740.33119.stgit@farscape.rchland.ibm.com>
On Tue, 05 Jun 2007 12:48:32 -0500
Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>
> When we get into a state where VM has ran out of memory, and it's time to
> thwack a process, we should take out the entire process group, rather than
> just one thread.
>
> Tested on i386
>
> Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> ---
>
> arch/i386/mm/fault.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
> index b8c4e25..82aec0e 100644
> --- a/arch/i386/mm/fault.c
> +++ b/arch/i386/mm/fault.c
> @@ -567,8 +567,10 @@ out_of_memory:
> goto survive;
> }
> printk("VM: killing process %s\n", tsk->comm);
> - if (error_code & 4)
> + if (error_code & 4) {
> + zap_other_threads(tsk);
> do_exit(SIGKILL);
> + }
> goto no_context;
>
zap_other_threads() requires tasklist_lock.
If we're going to do this then we should probably create some new function
(with a better name) which takes tasklsit_lock and then calls
zap_other_threads().
Does this patch fix any observed-in-the-real-world problem? If so, please
describe it.
next prev parent reply other threads:[~2007-06-07 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 17:48 [PATCH 1/3] [PATCH i386] during VM oom condition, kill all threads in process group Will Schmidt
2007-06-05 17:48 ` [PATCH 2/3] [PATCH powerpc] " Will Schmidt
2007-06-05 18:17 ` Will Schmidt
2007-06-05 17:48 ` [PATCH 3/3] [PATCH x86_64] " Will Schmidt
2007-06-07 22:34 ` Andrew Morton [this message]
2007-06-07 23:16 ` [PATCH 1/3] [PATCH i386] " Anton Blanchard
2007-06-08 0:10 ` Andrew Morton
2007-06-08 19:19 ` Will Schmidt
2007-06-08 19:32 ` Andrew Morton
2007-06-08 21:12 ` Will Schmidt
2007-06-08 22:48 ` Eric W. Biederman
2007-06-13 15:51 ` Oleg Nesterov
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=20070607153459.2a1b3230.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuxppc-dev@ozlabs.org \
--cc=will_schmidt@vnet.ibm.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