From: Roger Larsson <roger.larsson@norran.net>
To: Rik van Riel <riel@conectiva.com.br>,
Linus Torvalds <torvalds@transmeta.com>,
alan.cox@redhat.com
Cc: linux-mm@kvack.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Upd: [PATCH NG] alloc_pages_limit & pages_min
Date: Thu, 23 Aug 2001 21:28:44 +0200 [thread overview]
Message-ID: <200108231933.f7NJX8j21551@mailc.telia.com> (raw)
In-Reply-To: <Pine.LNX.4.33L.0108231600020.31410-100000@duckman.distro.conectiva>
Riel convinced be to back off a part of the patch.
Here comes an updated one.
--
Roger Larsson
Skelleftea
Sweden
*******************************************
Patch prepared by: roger.larsson@norran.net
Name of file: linux-2.4.8-pre3-pages_min-R3
--- linux/mm/page_alloc.c.orig Thu Aug 23 19:58:55 2001
+++ linux/mm/page_alloc.c Thu Aug 23 21:19:20 2001
@@ -253,11 +253,26 @@
if (z->free_pages + z->inactive_clean_pages >= water_mark) {
struct page *page = NULL;
- /* If possible, reclaim a page directly. */
- if (direct_reclaim)
+
+ /*
+ * Reclaim a page from the inactive_clean list.
+ * If needed, refill the free list up to the
+ * low water mark.
+ */
+ if (direct_reclaim) {
page = reclaim_page(z);
- /* If that fails, fall back to rmqueue. */
- if (!page)
+
+ while (page && z->free_pages < z->pages_min) {
+ __free_page(page);
+ page = reclaim_page(z);
+ }
+
+ /* let kreclaimd handle up to pages_high */
+ }
+ /* If that fails, fall back to rmqueue, but never let
+ * free_pages go below pages_min...
+ */
+ if (!page && z->free_pages >= z->pages_min)
page = rmqueue(z, order);
if (page)
return page;
--
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-mm.org/
next prev parent reply other threads:[~2001-08-23 19:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-22 23:46 Roger Larsson
2001-08-23 0:40 ` Rik van Riel
2001-08-23 18:36 ` Roger Larsson
2001-08-23 18:44 ` Rik van Riel
2001-08-23 18:52 ` Roger Larsson
2001-08-23 19:03 ` Rik van Riel
2001-08-23 19:28 ` Roger Larsson [this message]
2001-08-23 18:45 ` Roger Larsson
2001-08-23 18:55 ` 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=200108231933.f7NJX8j21551@mailc.telia.com \
--to=roger.larsson@norran.net \
--cc=alan.cox@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
--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