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>
This commit is contained in:
committed by
Linus Torvalds
parent
bce7394a3e
commit
6837765963
14
mm/Kconfig
14
mm/Kconfig
@@ -203,25 +203,13 @@ config VIRT_TO_BUS
|
||||
def_bool y
|
||||
depends on !ARCH_NO_VIRT_TO_BUS
|
||||
|
||||
config UNEVICTABLE_LRU
|
||||
bool "Add LRU list to track non-evictable pages"
|
||||
default y
|
||||
help
|
||||
Keeps unevictable pages off of the active and inactive pageout
|
||||
lists, so kswapd will not waste CPU time or have its balancing
|
||||
algorithms thrown off by scanning these pages. Selecting this
|
||||
will use one page flag and increase the code size a little,
|
||||
say Y unless you know what you are doing.
|
||||
|
||||
See Documentation/vm/unevictable-lru.txt for more information.
|
||||
|
||||
config HAVE_MLOCK
|
||||
bool
|
||||
default y if MMU=y
|
||||
|
||||
config HAVE_MLOCKED_PAGE_BIT
|
||||
bool
|
||||
default y if HAVE_MLOCK=y && UNEVICTABLE_LRU=y
|
||||
default y if HAVE_MLOCK=y
|
||||
|
||||
config MMU_NOTIFIER
|
||||
bool
|
||||
|
@@ -73,7 +73,6 @@ static inline void munlock_vma_pages_all(struct vm_area_struct *vma)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
/*
|
||||
* unevictable_migrate_page() called only from migrate_page_copy() to
|
||||
* migrate unevictable flag to new page.
|
||||
@@ -85,11 +84,6 @@ static inline void unevictable_migrate_page(struct page *new, struct page *old)
|
||||
if (TestClearPageUnevictable(old))
|
||||
SetPageUnevictable(new);
|
||||
}
|
||||
#else
|
||||
static inline void unevictable_migrate_page(struct page *new, struct page *old)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
|
||||
/*
|
||||
|
22
mm/mlock.c
22
mm/mlock.c
@@ -31,7 +31,6 @@ int can_do_mlock(void)
|
||||
}
|
||||
EXPORT_SYMBOL(can_do_mlock);
|
||||
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
/*
|
||||
* Mlocked pages are marked with PageMlocked() flag for efficient testing
|
||||
* in vmscan and, possibly, the fault path; and to support semi-accurate
|
||||
@@ -261,27 +260,6 @@ static int __mlock_posix_error_return(long retval)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#else /* CONFIG_UNEVICTABLE_LRU */
|
||||
|
||||
/*
|
||||
* Just make pages present if VM_LOCKED. No-op if unlocking.
|
||||
*/
|
||||
static long __mlock_vma_pages_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end,
|
||||
int mlock)
|
||||
{
|
||||
if (mlock && (vma->vm_flags & VM_LOCKED))
|
||||
return make_pages_present(start, end);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __mlock_posix_error_return(long retval)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_UNEVICTABLE_LRU */
|
||||
|
||||
/**
|
||||
* mlock_vma_pages_range() - mlock pages in specified vma range.
|
||||
* @vma - the vma containing the specfied address range
|
||||
|
@@ -2077,19 +2077,14 @@ void show_free_areas(void)
|
||||
|
||||
printk("Active_anon:%lu active_file:%lu inactive_anon:%lu\n"
|
||||
" inactive_file:%lu"
|
||||
//TODO: check/adjust line lengths
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
" unevictable:%lu"
|
||||
#endif
|
||||
" dirty:%lu writeback:%lu unstable:%lu\n"
|
||||
" free:%lu slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n",
|
||||
global_page_state(NR_ACTIVE_ANON),
|
||||
global_page_state(NR_ACTIVE_FILE),
|
||||
global_page_state(NR_INACTIVE_ANON),
|
||||
global_page_state(NR_INACTIVE_FILE),
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
global_page_state(NR_UNEVICTABLE),
|
||||
#endif
|
||||
global_page_state(NR_FILE_DIRTY),
|
||||
global_page_state(NR_WRITEBACK),
|
||||
global_page_state(NR_UNSTABLE_NFS),
|
||||
@@ -2113,9 +2108,7 @@ void show_free_areas(void)
|
||||
" inactive_anon:%lukB"
|
||||
" active_file:%lukB"
|
||||
" inactive_file:%lukB"
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
" unevictable:%lukB"
|
||||
#endif
|
||||
" present:%lukB"
|
||||
" pages_scanned:%lu"
|
||||
" all_unreclaimable? %s"
|
||||
@@ -2129,9 +2122,7 @@ void show_free_areas(void)
|
||||
K(zone_page_state(zone, NR_INACTIVE_ANON)),
|
||||
K(zone_page_state(zone, NR_ACTIVE_FILE)),
|
||||
K(zone_page_state(zone, NR_INACTIVE_FILE)),
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
K(zone_page_state(zone, NR_UNEVICTABLE)),
|
||||
#endif
|
||||
K(zone->present_pages),
|
||||
zone->pages_scanned,
|
||||
(zone_is_all_unreclaimable(zone) ? "yes" : "no")
|
||||
|
@@ -1202,7 +1202,6 @@ int try_to_unmap(struct page *page, int migration)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
/**
|
||||
* try_to_munlock - try to munlock a page
|
||||
* @page: the page to be munlocked
|
||||
@@ -1226,4 +1225,4 @@ int try_to_munlock(struct page *page)
|
||||
else
|
||||
return try_to_unmap_file(page, 1, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
17
mm/vmscan.c
17
mm/vmscan.c
@@ -514,7 +514,6 @@ int remove_mapping(struct address_space *mapping, struct page *page)
|
||||
*
|
||||
* lru_lock must not be held, interrupts must be enabled.
|
||||
*/
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
void putback_lru_page(struct page *page)
|
||||
{
|
||||
int lru;
|
||||
@@ -568,20 +567,6 @@ redo:
|
||||
put_page(page); /* drop ref from isolate */
|
||||
}
|
||||
|
||||
#else /* CONFIG_UNEVICTABLE_LRU */
|
||||
|
||||
void putback_lru_page(struct page *page)
|
||||
{
|
||||
int lru;
|
||||
VM_BUG_ON(PageLRU(page));
|
||||
|
||||
lru = !!TestClearPageActive(page) + page_is_file_cache(page);
|
||||
lru_cache_add_lru(page, lru);
|
||||
put_page(page);
|
||||
}
|
||||
#endif /* CONFIG_UNEVICTABLE_LRU */
|
||||
|
||||
|
||||
/*
|
||||
* shrink_page_list() returns the number of reclaimed pages
|
||||
*/
|
||||
@@ -2470,7 +2455,6 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
/*
|
||||
* page_evictable - test whether a page is evictable
|
||||
* @page: the page to test
|
||||
@@ -2717,4 +2701,3 @@ void scan_unevictable_unregister_node(struct node *node)
|
||||
sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -629,10 +629,8 @@ static const char * const vmstat_text[] = {
|
||||
"nr_active_anon",
|
||||
"nr_inactive_file",
|
||||
"nr_active_file",
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
"nr_unevictable",
|
||||
"nr_mlock",
|
||||
#endif
|
||||
"nr_anon_pages",
|
||||
"nr_mapped",
|
||||
"nr_file_pages",
|
||||
@@ -687,7 +685,6 @@ static const char * const vmstat_text[] = {
|
||||
"htlb_buddy_alloc_success",
|
||||
"htlb_buddy_alloc_fail",
|
||||
#endif
|
||||
#ifdef CONFIG_UNEVICTABLE_LRU
|
||||
"unevictable_pgs_culled",
|
||||
"unevictable_pgs_scanned",
|
||||
"unevictable_pgs_rescued",
|
||||
@@ -697,7 +694,6 @@ static const char * const vmstat_text[] = {
|
||||
"unevictable_pgs_stranded",
|
||||
"unevictable_pgs_mlockfreed",
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
|
||||
|
Reference in New Issue
Block a user