Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68377659 authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Linus Torvalds
Browse files

mm: remove CONFIG_UNEVICTABLE_LRU config option



Currently, nobody wants to turn UNEVICTABLE_LRU off.  Thus this
configurability is unnecessary.

Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andi Kleen <andi@firstfloor.org>
Acked-by: default avatarMinchan 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bce7394a
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -72,10 +72,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
		       "Node %d Inactive(anon): %8lu kB\n"
		       "Node %d Active(file):   %8lu kB\n"
		       "Node %d Inactive(file): %8lu kB\n"
#ifdef CONFIG_UNEVICTABLE_LRU
		       "Node %d Unevictable:    %8lu kB\n"
		       "Node %d Mlocked:        %8lu kB\n"
#endif
#ifdef CONFIG_HIGHMEM
		       "Node %d HighTotal:      %8lu kB\n"
		       "Node %d HighFree:       %8lu kB\n"
@@ -105,10 +103,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
		       nid, K(node_page_state(nid, NR_INACTIVE_ANON)),
		       nid, K(node_page_state(nid, NR_ACTIVE_FILE)),
		       nid, K(node_page_state(nid, NR_INACTIVE_FILE)),
#ifdef CONFIG_UNEVICTABLE_LRU
		       nid, K(node_page_state(nid, NR_UNEVICTABLE)),
		       nid, K(node_page_state(nid, NR_MLOCK)),
#endif
#ifdef CONFIG_HIGHMEM
		       nid, K(i.totalhigh),
		       nid, K(i.freehigh),
+0 −4
Original line number Diff line number Diff line
@@ -64,10 +64,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
		"Inactive(anon): %8lu kB\n"
		"Active(file):   %8lu kB\n"
		"Inactive(file): %8lu kB\n"
#ifdef CONFIG_UNEVICTABLE_LRU
		"Unevictable:    %8lu kB\n"
		"Mlocked:        %8lu kB\n"
#endif
#ifdef CONFIG_HIGHMEM
		"HighTotal:      %8lu kB\n"
		"HighFree:       %8lu kB\n"
@@ -109,10 +107,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
		K(pages[LRU_INACTIVE_ANON]),
		K(pages[LRU_ACTIVE_FILE]),
		K(pages[LRU_INACTIVE_FILE]),
#ifdef CONFIG_UNEVICTABLE_LRU
		K(pages[LRU_UNEVICTABLE]),
		K(global_page_state(NR_MLOCK)),
#endif
#ifdef CONFIG_HIGHMEM
		K(i.totalhigh),
		K(i.freehigh),
+0 −2
Original line number Diff line number Diff line
@@ -172,10 +172,8 @@ static u64 get_uflags(struct page *page)
	u |= kpf_copy_bit(k, KPF_SWAPCACHE,	PG_swapcache);
	u |= kpf_copy_bit(k, KPF_SWAPBACKED,	PG_swapbacked);

#ifdef CONFIG_UNEVICTABLE_LRU
	u |= kpf_copy_bit(k, KPF_UNEVICTABLE,	PG_unevictable);
	u |= kpf_copy_bit(k, KPF_MLOCKED,	PG_mlocked);
#endif

#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
	u |= kpf_copy_bit(k, KPF_UNCACHED,	PG_uncached);
+0 −13
Original line number Diff line number Diff line
@@ -83,13 +83,8 @@ enum zone_stat_item {
	NR_ACTIVE_ANON,		/*  "     "     "   "       "         */
	NR_INACTIVE_FILE,	/*  "     "     "   "       "         */
	NR_ACTIVE_FILE,		/*  "     "     "   "       "         */
#ifdef CONFIG_UNEVICTABLE_LRU
	NR_UNEVICTABLE,		/*  "     "     "   "       "         */
	NR_MLOCK,		/* mlock()ed pages found and moved off LRU */
#else
	NR_UNEVICTABLE = NR_ACTIVE_FILE, /* avoid compiler errors in dead code */
	NR_MLOCK = NR_ACTIVE_FILE,
#endif
	NR_ANON_PAGES,	/* Mapped anonymous pages */
	NR_FILE_MAPPED,	/* pagecache pages mapped into pagetables.
			   only modified from process context */
@@ -132,11 +127,7 @@ enum lru_list {
	LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE,
	LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE,
	LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE,
#ifdef CONFIG_UNEVICTABLE_LRU
	LRU_UNEVICTABLE,
#else
	LRU_UNEVICTABLE = LRU_ACTIVE_FILE, /* avoid compiler errors in dead code */
#endif
	NR_LRU_LISTS
};

@@ -156,11 +147,7 @@ static inline int is_active_lru(enum lru_list l)

static inline int is_unevictable_lru(enum lru_list l)
{
#ifdef CONFIG_UNEVICTABLE_LRU
	return (l == LRU_UNEVICTABLE);
#else
	return 0;
#endif
}

enum zone_watermarks {
+1 −15
Original line number Diff line number Diff line
@@ -95,9 +95,7 @@ enum pageflags {
	PG_reclaim,		/* To be reclaimed asap */
	PG_buddy,		/* Page is free, on buddy lists */
	PG_swapbacked,		/* Page is backed by RAM/swap */
#ifdef CONFIG_UNEVICTABLE_LRU
	PG_unevictable,		/* Page is "unevictable"  */
#endif
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
	PG_mlocked,		/* Page is vma mlocked */
#endif
@@ -248,14 +246,8 @@ PAGEFLAG_FALSE(SwapCache)
	SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache)
#endif

#ifdef CONFIG_UNEVICTABLE_LRU
PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
	TESTCLEARFLAG(Unevictable, unevictable)
#else
PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable)
	SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable)
	__CLEARPAGEFLAG_NOOP(Unevictable)
#endif

#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
#define MLOCK_PAGES 1
@@ -382,12 +374,6 @@ static inline void __ClearPageTail(struct page *page)

#endif /* !PAGEFLAGS_EXTENDED */

#ifdef CONFIG_UNEVICTABLE_LRU
#define __PG_UNEVICTABLE	(1 << PG_unevictable)
#else
#define __PG_UNEVICTABLE	0
#endif

#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
#define __PG_MLOCKED		(1 << PG_mlocked)
#else
@@ -403,7 +389,7 @@ static inline void __ClearPageTail(struct page *page)
	 1 << PG_private | 1 << PG_private_2 | \
	 1 << PG_buddy	 | 1 << PG_writeback | 1 << PG_reserved | \
	 1 << PG_slab	 | 1 << PG_swapcache | 1 << PG_active | \
	 __PG_UNEVICTABLE | __PG_MLOCKED)
	 1 << PG_unevictable | __PG_MLOCKED)

/*
 * Flags checked when a page is prepped for return by the page allocator.
Loading