Skip to contentSkip to conversation

+ mm-vmscan-reduce-size-of-inactive-file-list.patch tentatively added to -mm tree

PATCH [email protected] 1 participant 1 message Apr 4, 2016

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch titled
Subject: mm: vmscan: reduce size of inactive file list
has been added to the -mm tree. Its filename is
mm-vmscan-reduce-size-of-inactive-file-list.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-reduce-size-of-inactive-file-list.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-reduce-size-of-inactive-file-list.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Rik van Riel <[email protected]>
Subject: mm: vmscan: reduce size of inactive file list

The inactive file list should still be large enough to contain readahead windows and freshly written file data, but it no longer is the only source for detecting multiple accesses to file pages. The workingset refault measurement code causes recently evicted file pages that get accessed again after a shorter interval to be promoted directly to the active list.

With that mechanism in place, we can afford to (on a larger system) dedicate more memory to the active file list, so we can actually cache more of the frequently used file pages in memory, and not have them pushed out by streaming writes, once-used streaming file reads, etc.

This can help things like database workloads, where only half the page cache can currently be used to cache the database working set. This patch automatically increases that fraction on larger systems, using the same ratio that has already been used for anonymous memory.

---

 include/linux/memcontrol.h |   25 --------
 mm/page_alloc.c            |   44 --------------
 mm/vmscan.c                |  104 ++++++++++++++---------------------
 3 files changed, 42 insertions(+), 131 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~mm-vmscan-reduce-size-of-inactive-file-list +0 -25
diff -puN include/linux/memcontrol.h~mm-vmscan-reduce-size-of-inactive-file-list include/linux/memcontrol.h
@@ -415,25 +415,6 @@ unsigned long mem_cgroup_get_lru_size(st
 	return mz->lru_size[lru];
 }
 
-static inline bool mem_cgroup_inactive_anon_is_low(struct lruvec *lruvec)
-{
-	unsigned long inactive_ratio;
-	unsigned long inactive;
-	unsigned long active;
-	unsigned long gb;
-
-	inactive = mem_cgroup_get_lru_size(lruvec, LRU_INACTIVE_ANON);
-	active = mem_cgroup_get_lru_size(lruvec, LRU_ACTIVE_ANON);
-
-	gb = (inactive + active) >> (30 - PAGE_SHIFT);
-	if (gb)
-		inactive_ratio = int_sqrt(10 * gb);
-	else
-		inactive_ratio = 1;
-
-	return inactive * inactive_ratio < active;
-}
-
 void mem_cgroup_handle_over_high(void);
 
 void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
@@ -645,12 +626,6 @@ static inline bool mem_cgroup_online(str
 {
 	return true;
 }
-
-static inline bool
-mem_cgroup_inactive_anon_is_low(struct lruvec *lruvec)
-{
-	return true;
-}
 
 static inline unsigned long
 mem_cgroup_get_lru_size(struct lruvec *lruvec, enum lru_list lru)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-vmscan-reduce-size-of-inactive-file-list +0 -44

56 lines not on this page · raw message

mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-reduce-size-of-inactive-file-list +42 -62

146 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

mm-workingset-only-do-workingset-activations-on-reads.patch mm-vmscan-reduce-size-of-inactive-file-list.patch