aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-06-16 18:32:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:42 -0400
commit6837765963f1723e80ca97b1fae660f3a60d77df (patch)
treea9a6ed4b7e3bf188966da78b04bf39298f24375a /include
parentbce7394a3ef82b8477952fbab838e4a6e8cb47d2 (diff)
mm: remove CONFIG_UNEVICTABLE_LRU config option
Currently, nobody wants to turn UNEVICTABLE_LRU off. Thus this configurability is unnecessary. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Andi Kleen <andi@firstfloor.org> Acked-by: Minchan Kim <minchan.kim@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Matt Mackall <mpm@selenic.com> Cc: Rik van Riel <riel@redhat.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h13
-rw-r--r--include/linux/page-flags.h16
-rw-r--r--include/linux/pagemap.h12
-rw-r--r--include/linux/rmap.h7
-rw-r--r--include/linux/swap.h19
-rw-r--r--include/linux/vmstat.h2
6 files changed, 1 insertions, 68 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index db976b9f8791..889598537370 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -83,13 +83,8 @@ enum zone_stat_item {
83 NR_ACTIVE_ANON, /* " " " " " */ 83 NR_ACTIVE_ANON, /* " " " " " */
84 NR_INACTIVE_FILE, /* " " " " " */ 84 NR_INACTIVE_FILE, /* " " " " " */
85 NR_ACTIVE_FILE, /* " " " " " */ 85 NR_ACTIVE_FILE, /* " " " " " */
86#ifdef CONFIG_UNEVICTABLE_LRU
87 NR_UNEVICTABLE, /* " " " " " */ 86 NR_UNEVICTABLE, /* " " " " " */
88 NR_MLOCK, /* mlock()ed pages found and moved off LRU */ 87 NR_MLOCK, /* mlock()ed pages found and moved off LRU */
89#else
90 NR_UNEVICTABLE = NR_ACTIVE_FILE, /* avoid compiler errors in dead code */
91 NR_MLOCK = NR_ACTIVE_FILE,
92#endif
93 NR_ANON_PAGES, /* Mapped anonymous pages */ 88 NR_ANON_PAGES, /* Mapped anonymous pages */
94 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. 89 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
95 only modified from process context */ 90 only modified from process context */
@@ -132,11 +127,7 @@ enum lru_list {
132 LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE, 127 LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE,
133 LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE, 128 LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE,
134 LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE, 129 LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE,
135#ifdef CONFIG_UNEVICTABLE_LRU
136 LRU_UNEVICTABLE, 130 LRU_UNEVICTABLE,
137#else
138 LRU_UNEVICTABLE = LRU_ACTIVE_FILE, /* avoid compiler errors in dead code */
139#endif
140 NR_LRU_LISTS 131 NR_LRU_LISTS
141}; 132};
142 133
@@ -156,11 +147,7 @@ static inline int is_active_lru(enum lru_list l)
156 147
157static inline int is_unevictable_lru(enum lru_list l) 148static inline int is_unevictable_lru(enum lru_list l)
158{ 149{
159#ifdef CONFIG_UNEVICTABLE_LRU
160 return (l == LRU_UNEVICTABLE); 150 return (l == LRU_UNEVICTABLE);
161#else
162 return 0;
163#endif
164} 151}
165 152
166enum zone_watermarks { 153enum zone_watermarks {
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 62214c7d2d93..d6792f88a176 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -95,9 +95,7 @@ enum pageflags {
95 PG_reclaim, /* To be reclaimed asap */ 95 PG_reclaim, /* To be reclaimed asap */
96 PG_buddy, /* Page is free, on buddy lists */ 96 PG_buddy, /* Page is free, on buddy lists */
97 PG_swapbacked, /* Page is backed by RAM/swap */ 97 PG_swapbacked, /* Page is backed by RAM/swap */
98#ifdef CONFIG_UNEVICTABLE_LRU
99 PG_unevictable, /* Page is "unevictable" */ 98 PG_unevictable, /* Page is "unevictable" */
100#endif
101#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT 99#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
102 PG_mlocked, /* Page is vma mlocked */ 100 PG_mlocked, /* Page is vma mlocked */
103#endif 101#endif
@@ -248,14 +246,8 @@ PAGEFLAG_FALSE(SwapCache)
248 SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache) 246 SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache)
249#endif 247#endif
250 248
251#ifdef CONFIG_UNEVICTABLE_LRU
252PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) 249PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
253 TESTCLEARFLAG(Unevictable, unevictable) 250 TESTCLEARFLAG(Unevictable, unevictable)
254#else
255PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable)
256 SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable)
257 __CLEARPAGEFLAG_NOOP(Unevictable)
258#endif
259 251
260#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT 252#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
261#define MLOCK_PAGES 1 253#define MLOCK_PAGES 1
@@ -382,12 +374,6 @@ static inline void __ClearPageTail(struct page *page)
382 374
383#endif /* !PAGEFLAGS_EXTENDED */ 375#endif /* !PAGEFLAGS_EXTENDED */
384 376
385#ifdef CONFIG_UNEVICTABLE_LRU
386#define __PG_UNEVICTABLE (1 << PG_unevictable)
387#else
388#define __PG_UNEVICTABLE 0
389#endif
390
391#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT 377#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
392#define __PG_MLOCKED (1 << PG_mlocked) 378#define __PG_MLOCKED (1 << PG_mlocked)
393#else 379#else
@@ -403,7 +389,7 @@ static inline void __ClearPageTail(struct page *page)
403 1 << PG_private | 1 << PG_private_2 | \ 389 1 << PG_private | 1 << PG_private_2 | \
404 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ 390 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \
405 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ 391 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
406 __PG_UNEVICTABLE | __PG_MLOCKED) 392 1 << PG_unevictable | __PG_MLOCKED)
407 393
408/* 394/*
409 * Flags checked when a page is prepped for return by the page allocator. 395 * Flags checked when a page is prepped for return by the page allocator.
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 34da5230faab..aec3252afcf5 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -22,9 +22,7 @@ enum mapping_flags {
22 AS_EIO = __GFP_BITS_SHIFT + 0, /* IO error on async write */ 22 AS_EIO = __GFP_BITS_SHIFT + 0, /* IO error on async write */
23 AS_ENOSPC = __GFP_BITS_SHIFT + 1, /* ENOSPC on async write */ 23 AS_ENOSPC = __GFP_BITS_SHIFT + 1, /* ENOSPC on async write */
24 AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */ 24 AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */
25#ifdef CONFIG_UNEVICTABLE_LRU
26 AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */ 25 AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */
27#endif
28}; 26};
29 27
30static inline void mapping_set_error(struct address_space *mapping, int error) 28static inline void mapping_set_error(struct address_space *mapping, int error)
@@ -37,8 +35,6 @@ static inline void mapping_set_error(struct address_space *mapping, int error)
37 } 35 }
38} 36}
39 37
40#ifdef CONFIG_UNEVICTABLE_LRU
41
42static inline void mapping_set_unevictable(struct address_space *mapping) 38static inline void mapping_set_unevictable(struct address_space *mapping)
43{ 39{
44 set_bit(AS_UNEVICTABLE, &mapping->flags); 40 set_bit(AS_UNEVICTABLE, &mapping->flags);
@@ -55,14 +51,6 @@ static inline int mapping_unevictable(struct address_space *mapping)
55 return test_bit(AS_UNEVICTABLE, &mapping->flags); 51 return test_bit(AS_UNEVICTABLE, &mapping->flags);
56 return !!mapping; 52 return !!mapping;
57} 53}
58#else
59static inline void mapping_set_unevictable(struct address_space *mapping) { }
60static inline void mapping_clear_unevictable(struct address_space *mapping) { }
61static inline int mapping_unevictable(struct address_space *mapping)
62{
63 return 0;
64}
65#endif
66 54
67static inline gfp_t mapping_gfp_mask(struct address_space * mapping) 55static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
68{ 56{
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index b35bc0e19cd9..619379a1dd98 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -105,18 +105,11 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *);
105 */ 105 */
106int page_mkclean(struct page *); 106int page_mkclean(struct page *);
107 107
108#ifdef CONFIG_UNEVICTABLE_LRU
109/* 108/*
110 * called in munlock()/munmap() path to check for other vmas holding 109 * called in munlock()/munmap() path to check for other vmas holding
111 * the page mlocked. 110 * the page mlocked.
112 */ 111 */
113int try_to_munlock(struct page *); 112int try_to_munlock(struct page *);
114#else
115static inline int try_to_munlock(struct page *page)
116{
117 return 0; /* a.k.a. SWAP_SUCCESS */
118}
119#endif
120 113
121#else /* !CONFIG_MMU */ 114#else /* !CONFIG_MMU */
122 115
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d476aad3ff57..f30c06908f09 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -235,7 +235,6 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
235} 235}
236#endif 236#endif
237 237
238#ifdef CONFIG_UNEVICTABLE_LRU
239extern int page_evictable(struct page *page, struct vm_area_struct *vma); 238extern int page_evictable(struct page *page, struct vm_area_struct *vma);
240extern void scan_mapping_unevictable_pages(struct address_space *); 239extern void scan_mapping_unevictable_pages(struct address_space *);
241 240
@@ -244,24 +243,6 @@ extern int scan_unevictable_handler(struct ctl_table *, int, struct file *,
244 void __user *, size_t *, loff_t *); 243 void __user *, size_t *, loff_t *);
245extern int scan_unevictable_register_node(struct node *node); 244extern int scan_unevictable_register_node(struct node *node);
246extern void scan_unevictable_unregister_node(struct node *node); 245extern void scan_unevictable_unregister_node(struct node *node);
247#else
248static inline int page_evictable(struct page *page,
249 struct vm_area_struct *vma)
250{
251 return 1;
252}
253
254static inline void scan_mapping_unevictable_pages(struct address_space *mapping)
255{
256}
257
258static inline int scan_unevictable_register_node(struct node *node)
259{
260 return 0;
261}
262
263static inline void scan_unevictable_unregister_node(struct node *node) { }
264#endif
265 246
266extern int kswapd_run(int nid); 247extern int kswapd_run(int nid);
267 248
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 524cd1b28ecb..ff4696c6dce3 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -41,7 +41,6 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
41#ifdef CONFIG_HUGETLB_PAGE 41#ifdef CONFIG_HUGETLB_PAGE
42 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, 42 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
43#endif 43#endif
44#ifdef CONFIG_UNEVICTABLE_LRU
45 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ 44 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */
46 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ 45 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */
47 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ 46 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */
@@ -50,7 +49,6 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
50 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ 49 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
51 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ 50 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
52 UNEVICTABLE_MLOCKFREED, 51 UNEVICTABLE_MLOCKFREED,
53#endif
54 NR_VM_EVENT_ITEMS 52 NR_VM_EVENT_ITEMS
55}; 53};
56 54