The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear 
at https://src.openvz.org/scm/ovz/vzkernel.git
after rebase
------>
commit 3376535fa6f9b4798234579fee75bac2a1448bce
Author: Vladimir Davydov <vdavy...@virtuozzo.com>
Date:   Wed Dec 2 19:09:48 2015 +0400

    tcache: exert equal pressure on tmem and lru pages
    
    shrinker->seeks is supposed to be an estimate of the number of disk
    seeks needed to recreate an object. shrink_slab will divide lru scan
    ratio over ->seeks to scan objects that need more seeks to be brought
    back less intensively.
    
    For most shrinkers (e.g. dcache, icache) ->seeks equals 2 (aka
    DEFAULT_SEEKS), because rereading an object requires random IO (you need
    seek to the object and seek back), in contrast to page cache which can
    benefit from read-ahead. Hence dcache experiences half pressure exerted
    upon lru pages.
    
    However, tmem is not like dcache - tmem pages are created from lru pages
    so they should receive the same pressure. That said, let's set ->seeks
    to 1 for tmem shrinkers.
    
    Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktk...@odin.com>
---
 mm/tcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/tcache.c b/mm/tcache.c
index e8ffa91..b8757cf 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -817,7 +817,7 @@ static unsigned long tcache_shrink_scan(struct shrinker 
*shrink,
 struct shrinker tcache_shrinker = {
        .count_objects          = tcache_shrink_count,
        .scan_objects           = tcache_shrink_scan,
-       .seeks                  = DEFAULT_SEEKS,
+       .seeks                  = 1,
        .flags                  = SHRINKER_NUMA_AWARE,
 };
 
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to