From: Rik van Riel <riel@nl.linux.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux MM <linux-mm@kvack.org>,
Linux Kernel <linux-kernel@vger.rutgers.edu>
Subject: 2.2.15pre4 VM fix
Date: Wed, 26 Jan 2000 01:20:48 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.10.10001260118220.1373-100000@mirkwood.dummy.home> (raw)
Hi Alan,
with the attached patch I hope to have fixed the 2.2.15pre4
VM problems. I didn't manage to break it myself, but maybe
one of the dear readers has a machine where they are able
to do so...
Please give this patch (against 2.2.15pre4) a solid beating
and report back to us. Thanks all!
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
--- mm/page_alloc.c.orig Tue Jan 25 00:01:43 2000
+++ mm/page_alloc.c Wed Jan 26 01:16:21 2000
@@ -210,6 +210,12 @@
*/
if (!(current->flags & PF_MEMALLOC)) {
int freed;
+ if (current->state != TASK_RUNNING && (gfp_mask & __GFP_WAIT)) {
+ printk("gfp called by non-running (%d) task from %p!\n",
+ current->state, __builtin_return_address(0));
+ /* if we're not running, we can't sleep */
+ gfp_mask &= ~__GFP_WAIT;
+ }
if (nr_free_pages <= freepages.low) {
wake_up_interruptible(&kswapd_wait);
@@ -224,6 +230,9 @@
current->flags |= PF_MEMALLOC;
freed = try_to_free_pages(gfp_mask);
current->flags &= ~PF_MEMALLOC;
+
+ if ((gfp_mask & __GFP_MED) && nr_free_pages > freepages.min / 2)
+ goto ok_to_allocate;
if (!freed && !(gfp_mask & __GFP_HIGH))
goto nopage;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next reply other threads:[~2000-01-26 0:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-26 0:20 Rik van Riel [this message]
2000-01-28 12:09 ` Ivan Kokshaysky
2000-01-28 14:40 ` Alan Cox
2000-01-28 16:29 ` Theodore Y. Ts'o
2000-01-28 16:48 ` Ivan Kokshaysky
2000-01-28 17:26 ` Theodore Y. Ts'o
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=Pine.LNX.4.10.10001260118220.1373-100000@mirkwood.dummy.home \
--to=riel@nl.linux.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.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