linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: Alan Cox <alan@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Zlatko Calusic <zlatko@iskon.hr>
Subject: reduce shrink_mmap rate of failure (initial attempt)
Date: Wed, 07 Jun 2000 01:49:58 +0200	[thread overview]
Message-ID: <393D8E26.E51525CB@norran.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

Hi all,

This is a trivial first attempt to reduce shrink_mmap failures
(leading to swap)

It is against 2.4.0-test1-ac7-riel3 but that is almost what
we have currently - and it is trivial to apply with an editor.

It might be possible to improve this further - but it is a start.
(Time for bed...)

/RogerL

--
Home page:
  http://www.norran.net/nra02596/

[-- Attachment #2: patch-filemap --]
[-- Type: text/plain, Size: 870 bytes --]

--- /usr/src/linux/mm/filemap.c.orig	Sat Jun  3 19:09:16 2000
+++ /usr/src/linux/mm/filemap.c	Wed Jun  7 01:21:19 2000
@@ -332,6 +332,14 @@
 		if (page->age)
 			goto dispose_continue;
 
+		/*
+		 * Page is from a zone we don't care about.
+		 * Don't drop page cache entries in vain.
+		 * Must be done before count - or do a count++
+		 */
+		if (page->zone->free_pages > page->zone->pages_high)
+			goto dispose_continue;
+
 		count--;
 		/*
 		 * Avoid unscalable SMP locking for pages we can
@@ -367,13 +375,6 @@
 				goto made_buffer_progress;
 			}
 		}
-
-		/*
-		 * Page is from a zone we don't care about.
-		 * Don't drop page cache entries in vain.
-		 */
-		if (page->zone->free_pages > page->zone->pages_high)
-			goto unlock_continue;
 
 		/* Take the pagecache_lock spinlock held to avoid
 		   other tasks to notice the page while we are looking at its

             reply	other threads:[~2000-06-06 23:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-06 23:49 Roger Larsson [this message]
2000-06-07  3:01 ` Quintela Carreira Juan J.
2000-06-07 13:22 ` Zlatko Calusic
2000-06-07 14:04 Roger Larsson
2000-06-07 14:35 ` Rik van Riel
2000-06-08  0:04 ` Roger Larsson

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=393D8E26.E51525CB@norran.net \
    --to=roger.larsson@norran.net \
    --cc=alan@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=zlatko@iskon.hr \
    /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