linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timofey Titovets <nefelim4ag@gmail.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: nefelim4ag@gmail.com, marco.antonio.780@gmail.com
Subject: [PATCH v2 0/3] KSM: Mark new vma for deduplication
Date: Sun,  9 Nov 2014 02:01:40 +0300	[thread overview]
Message-ID: <1415487703-1824-1-git-send-email-nefelim4ag@gmail.com> (raw)

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.

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)

Timofey Titovets (3):
  KSM: Add auto flag new VMA as VM_MERGEABLE
  KSM: Add to sysfs - mark_new_vma
  KSM: Add config to control mark_new_vma

 include/linux/ksm.h | 39 +++++++++++++++++++++++++++++++++++++++
 mm/Kconfig          |  7 +++++++
 mm/ksm.c            | 39 ++++++++++++++++++++++++++++++++++++++-
 mm/mmap.c           | 17 +++++++++++++++++
 4 files changed, 101 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-11-08 23:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-08 23:01 Timofey Titovets [this message]
2014-11-08 23:01 ` [PATCH v2 1/3] KSM: Add auto flag new VMA as VM_MERGEABLE Timofey Titovets
2014-11-08 23:01 ` [PATCH v2 2/3] KSM: Add to sysfs - mark_new_vma Timofey Titovets
2014-11-08 23:01 ` [PATCH v2 3/3] KSM: Add config to control mark_new_vma Timofey Titovets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415487703-1824-1-git-send-email-nefelim4ag@gmail.com \
    --to=nefelim4ag@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marco.antonio.780@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).