From: Marcelo Tosatti <marcelo@conectiva.com.br>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: [PATCH] Avoid !__GFP_IO allocations to eat from memory reservations
Date: Wed, 20 Jun 2001 23:13:46 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.21.0106202310430.13933-100000@freak.distro.conectiva> (raw)
Linus,
I just read pre3<->pre4 diff and it seems you missed this patch... here it
goes again.
In pre3/4, GFP_BUFFER allocations can eat from the "emergency" memory
reservations in case try_to_free_pages() fails for those allocations in
__alloc_pages().
Here goes the (tested) patch to fix that:
--- linux/mm/page_alloc.c.orig Thu Jun 14 11:00:14 2001
+++ linux/mm/page_alloc.c Thu Jun 14 11:32:56 2001
@@ -453,6 +453,12 @@
int progress = try_to_free_pages(gfp_mask);
if (progress || gfp_mask & __GFP_IO)
goto try_again;
+ /*
+ * Fail in case no progress was made and the
+ * allocation may not be able to block on IO.
+ */
+ else
+ return NULL;
}
}
}
next reply other threads:[~2001-06-21 4:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-21 2:13 Marcelo Tosatti [this message]
[not found] <20010614142822Z131175-12594+95@kanga.kvack.org>
2001-06-15 15:07 ` [PATCH] Avoid !__GFP_IO allocations to eat from memory reservations Chris Mason
-- strict thread matches above, loose matches on Subject: below --
2001-06-14 12:59 Marcelo Tosatti
2001-06-14 17:17 ` Daniel Phillips
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.21.0106202310430.13933-100000@freak.distro.conectiva \
--to=marcelo@conectiva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.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;
as well as URLs for NNTP newsgroup(s).