From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by kanga.kvack.org (Postfix) with ESMTP id 0A3F36B00DF for ; Thu, 13 Nov 2014 16:02:11 -0500 (EST) Received: by mail-wi0-f181.google.com with SMTP id n3so859917wiv.2 for ; Thu, 13 Nov 2014 13:02:10 -0800 (PST) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com. [2a00:1450:400c:c00::232]) by mx.google.com with ESMTPS id j9si46409181wjf.10.2014.11.13.13.02.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 13:02:10 -0800 (PST) Received: by mail-wg0-f50.google.com with SMTP id z12so17798254wgg.37 for ; Thu, 13 Nov 2014 13:02:09 -0800 (PST) From: Timofey Titovets Subject: [RESEND][PATCH V3 0/4] KSM: Mark new vma for deduplication Date: Fri, 14 Nov 2014 00:01:54 +0300 Message-Id: <1415912518-8508-1-git-send-email-nefelim4ag@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, Timofey Titovets Good time of day List, this tiny series of patches implement feature for auto deduping all anonymous memory. mark_new_vma - new ksm sysfs interface Every time then new vma created and mark_new_vma set to 1, then will be vma marked as VM_MERGEABLE and added to ksm queue. This can produce small overheads (I have not catch any problems or slowdown) This is useful for: Android (CM) devs which implement ksm support with patching system. Users of tiny pc. Servers what not use KVM but use something very releated, like containers. Can be pulled from: https://github.com/Nefelim4ag/linux.git ksm_improvements For tests: I have tested it and it working very good. For testing apply it and enable ksm: echo 1 | sudo tee /sys/kernel/mm/ksm/run This show how much memory saved: echo $[$(cat /sys/kernel/mm/ksm/pages_shared)*$(getconf PAGE_SIZE)/1024 ]KB On my system i save ~1% of memory 26 Mb/2100 Mb (deduped)/(used) v2: Added Kconfig for control default value of mark_new_vma Added sysfs interface for control mark_new_vma Splitted in several patches v3: Documentation for ksm changed for clarify new cha Timofey Titovets (4): KSM: Add auto flag new VMA as VM_MERGEABLE KSM: Add to sysfs - mark_new_vma KSM: Add config to control mark_new_vma KSM: mark_new_vma added to Documentation. Documentation/vm/ksm.txt | 7 +++++++ include/linux/ksm.h | 39 +++++++++++++++++++++++++++++++++++++++ mm/Kconfig | 7 +++++++ mm/ksm.c | 39 ++++++++++++++++++++++++++++++++++++++- mm/mmap.c | 17 +++++++++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) -- 2.1.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org