linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: [RFC:PATCH 07/09] shrink_active_list: pack file tails rather than move to inactive list
Date: Thu, 8 Nov 2007 12:47:54 -0700	[thread overview]
Message-ID: <20071108194753.17862.60164.sendpatchset@norville.austin.ibm.com> (raw)
In-Reply-To: <20071108194709.17862.16713.sendpatchset@norville.austin.ibm.com>

The big question is how aggressively we pack the tails.  This looked like
an easy place to start.  If a page is being moved from the active list to
the inactive list, and the tail can be safely packed, that is not mapped,
not dirty, etc., the tail is packed and the page removed from the page
cache.

Right now, pages that never get off the inactive list will not be packed.

I will be soliciting ideas for other places in the code where tails can
be packed.  One of my goals is not to be too aggressive, where tails are
packed and unpacked repeatedly.  I also don't want to add too much overhead,
such as an extra scan of the inactive list.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---

 mm/vmscan.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff -Nurp linux006/mm/vmscan.c linux007/mm/vmscan.c
--- linux006/mm/vmscan.c	2007-11-07 08:14:01.000000000 -0600
+++ linux007/mm/vmscan.c	2007-11-08 10:49:46.000000000 -0600
@@ -19,6 +19,7 @@
 #include <linux/pagemap.h>
 #include <linux/init.h>
 #include <linux/highmem.h>
+#include <linux/vm_file_tail.h>
 #include <linux/vmstat.h>
 #include <linux/file.h>
 #include <linux/writeback.h>
@@ -1035,7 +1036,12 @@ force_reclaim_mapped:
 				list_add(&page->lru, &l_active);
 				continue;
 			}
+		} else if (vm_file_tail_pack(page)) {
+			ClearPageActive(page);
+			page_cache_release(page);
+			continue;
 		}
+
 		list_add(&page->lru, &l_inactive);
 	}
 

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2007-11-08 19:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 19:47 [RFC:PATCH 00/09] VM File Tails Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 01/09] Add tail to address space Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 02/09] Core function for packing, unpacking, and freeing file tails Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 03/09] Release tail when inode is freed Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 04/09] Unpack or remove file tail when inode is resized Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 05/09] find_get_page() and find_lock_page() need to unpack the tail Dave Kleikamp
2007-11-08 19:47 ` [RFC:PATCH 06/09] For readahead, leave data in tail Dave Kleikamp
2007-11-08 19:47 ` Dave Kleikamp [this message]
2007-11-08 19:48 ` [RFC:PATCH 08/09] generic_file_aio_read can read directly from the tail. No need to unpack Dave Kleikamp
2007-11-08 19:48 ` [RFC:PATCH 09/09] VM tail statistics support Dave Kleikamp, Luiz Fernando N. Capitulino

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=20071108194753.17862.60164.sendpatchset@norville.austin.ibm.com \
    --to=shaggy@linux.vnet.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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