All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: akpm@digeo.com
Cc: linux-kernel@vger.kernel.org
Subject: [patch] 2.5: kill PF_MEMDIE
Date: 25 Nov 2002 01:32:02 -0500	[thread overview]
Message-ID: <1038205919.17472.48.camel@phantasy> (raw)

PF_MEMDIE seems to serve no needed purpose in 2.5.  In fact, it seems it
has no point in 2.4, either.

Attached patch, against 2.5.49-mm1, makes PF_MEMDIE die.

	Robert Love


 include/linux/sched.h |    1 -
 mm/oom_kill.c         |    2 +-
 mm/page_alloc.c       |    2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)


diff -urN linux-2.5.49-mm1/include/linux/sched.h linux/include/linux/sched.h
--- linux-2.5.49-mm1/include/linux/sched.h	2002-11-25 01:06:22.000000000 -0500
+++ linux/include/linux/sched.h	2002-11-25 00:54:12.000000000 -0500
@@ -421,7 +421,6 @@
 #define PF_DUMPCORE	0x00000200	/* dumped core */
 #define PF_SIGNALED	0x00000400	/* killed by a signal */
 #define PF_MEMALLOC	0x00000800	/* Allocating memory */
-#define PF_MEMDIE	0x00001000	/* Killed for out-of-memory */
 #define PF_FLUSHER	0x00002000	/* responsible for disk writeback */
 #define PF_NOWARN	0x00004000	/* debug: don't warn if alloc fails */
 
diff -urN linux-2.5.49-mm1/mm/oom_kill.c linux/mm/oom_kill.c
--- linux-2.5.49-mm1/mm/oom_kill.c	2002-11-25 01:13:53.000000000 -0500
+++ linux/mm/oom_kill.c	2002-11-25 01:05:08.000000000 -0500
@@ -146,7 +146,7 @@
 	 * exit() and clear out its resources quickly...
 	 */
 	p->time_slice = HZ;
-	p->flags |= PF_MEMALLOC | PF_MEMDIE;
+	p->flags |= PF_MEMALLOC;
 
 	/* This process has hardware access, be more careful. */
 	if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) {
diff -urN linux-2.5.49-mm1/mm/page_alloc.c linux/mm/page_alloc.c
--- linux-2.5.49-mm1/mm/page_alloc.c	2002-11-25 01:13:53.000000000 -0500
+++ linux/mm/page_alloc.c	2002-11-25 00:55:39.000000000 -0500
@@ -613,7 +613,7 @@
 	/* here we're in the low on memory slow path */
 
 rebalance:
-	if ((current->flags & (PF_MEMALLOC | PF_MEMDIE)) && !in_interrupt()) {
+	if ((current->flags & PF_MEMALLOC) && !in_interrupt()) {
 		/* go through the zonelist yet again, ignoring mins */
 		for (i = 0; zones[i] != NULL; i++) {
 			struct zone *z = zones[i];




             reply	other threads:[~2002-11-25  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25  6:32 Robert Love [this message]
2002-11-25 13:03 ` [patch] 2.5: kill PF_MEMDIE Hugh Dickins
2002-11-25 13:13 ` Rik van Riel

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=1038205919.17472.48.camel@phantasy \
    --to=rml@tech9.net \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.