linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	David Howells <dhowells@redhat.com>,
	Nick Piggin <npiggin@suse.de>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	Peter Zijlstra <peterz@infradead.com>,
	MinChan Kim <minchan.kim@gmail.com>,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: [patch 1/3] mm: decouple unevictable lru from mmu
Date: Sun, 22 Mar 2009 21:13:02 +0100	[thread overview]
Message-ID: <1237752784-1989-1-git-send-email-hannes@cmpxchg.org> (raw)
In-Reply-To: <20090321102044.GA3427@cmpxchg.org>

Mlock is only one source of unevictable pages but with the unevictable
lru enabled, mlock code is referenced unconditionally.

Decouple the two so that the unevictable lru can work without mlock
and thus on nommu setups where we still have unevictable pages from
e.g. ramfs.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.com>
Cc: MinChan Kim <minchan.kim@gmail.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
---
 mm/Kconfig    |    1 -
 mm/internal.h |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index a5b7781..fbb190e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -206,7 +206,6 @@ config VIRT_TO_BUS
 config UNEVICTABLE_LRU
 	bool "Add LRU list to track non-evictable pages"
 	default y
-	depends on MMU
 	help
 	  Keeps unevictable pages off of the active and inactive pageout
 	  lists, so kswapd will not waste CPU time or have its balancing
diff --git a/mm/internal.h b/mm/internal.h
index 478223b..ceaa629 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -90,7 +90,7 @@ static inline void unevictable_migrate_page(struct page *new, struct page *old)
 }
 #endif
 
-#ifdef CONFIG_UNEVICTABLE_LRU
+#if defined(CONFIG_UNEVICTABLE_LRU) && defined(CONFIG_MMU)
 /*
  * Called only in fault path via page_evictable() for a new page
  * to determine if it's being mapped into a LOCKED vma.
@@ -165,7 +165,7 @@ static inline void free_page_mlock(struct page *page)
 	}
 }
 
-#else /* CONFIG_UNEVICTABLE_LRU */
+#else /* CONFIG_UNEVICTABLE_LRU && CONFIG_MMU */
 static inline int is_mlocked_vma(struct vm_area_struct *v, struct page *p)
 {
 	return 0;
-- 
1.6.2.1.135.gde769

--
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>

  reply	other threads:[~2009-03-22 19:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090311153034.9389.19938.stgit@warthog.procyon.org.uk>
2009-03-11 22:03 ` [PATCH] NOMMU: Pages allocated to a ramfs inode's pagecache may get wrongly discarded Andrew Morton
2009-03-11 22:36   ` Johannes Weiner
2009-03-12  0:02   ` Andrew Morton
2009-03-12  0:35     ` Minchan Kim
2009-03-12  1:04       ` KOSAKI Motohiro
2009-03-12  1:52         ` Minchan Kim
2009-03-12  1:56           ` Minchan Kim
2009-03-12  2:00           ` KOSAKI Motohiro
2009-03-12  2:11             ` Minchan Kim
2009-03-12 12:19         ` Robin Getz
2009-03-12 17:55           ` [uClinux-dev] " Jamie Lokier
2009-03-13 17:33         ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU David Howells
2009-03-13 17:33           ` [PATCH 1/2] NOMMU: There is no mlock() for NOMMU, so don't provide the bits David Howells
2009-03-14 11:17             ` KOSAKI Motohiro
2009-03-13 17:33           ` [PATCH 2/2] NOMMU: Make CONFIG_UNEVICTABLE_LRU available when CONFIG_MMU=n David Howells
2009-03-14 11:17             ` KOSAKI Motohiro
2009-03-14  0:27           ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU Minchan Kim
2009-03-20 16:08             ` Lee Schermerhorn
2009-03-20 16:24             ` David Howells
2009-03-20 18:30               ` Lee Schermerhorn
2009-03-21 10:20                 ` Johannes Weiner
2009-03-22 20:13                   ` Johannes Weiner [this message]
2009-03-22 23:46                     ` [patch 1/3] mm: decouple unevictable lru from mmu KOSAKI Motohiro
2009-03-23  0:14                       ` Johannes Weiner
2009-03-23 10:48                       ` David Howells
2009-03-22 20:13                   ` [patch 2/3] ramfs-nommu: use generic lru cache Johannes Weiner
2009-03-23  2:22                     ` KOSAKI Motohiro
2009-03-22 20:13                   ` [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists Johannes Weiner
2009-03-23  0:44                     ` Minchan Kim
2009-03-23  2:21                       ` KOSAKI Motohiro
2009-03-23  8:42                         ` Johannes Weiner
2009-03-23  9:01                           ` KOSAKI Motohiro
2009-03-23  9:23                             ` KOSAKI Motohiro
2009-03-26  0:48                               ` Johannes Weiner
2009-03-23 10:40                   ` [patch 2/3] ramfs-nommu: use generic lru cache David Howells
2009-03-23 10:53                   ` [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists David Howells
2009-03-26  0:01                     ` Johannes Weiner
2009-03-26  8:56                       ` KOSAKI Motohiro
2009-03-26 10:36                         ` Johannes Weiner
2009-03-23 20:07                   ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU Lee Schermerhorn
2009-03-13 11:53       ` [PATCH] NOMMU: Pages allocated to a ramfs inode's pagecache may get wrongly discarded David Howells
2009-03-13 22:49         ` Johannes Weiner

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=1237752784-1989-1-git-send-email-hannes@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.com \
    --cc=riel@redhat.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