linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timofey Titovets <nefelim4ag@gmail.com>
To: linux-mm@kvack.org
Cc: Timofey Titovets <nefelim4ag@gmail.com>
Subject: [RFC PATCH 0/1] ksm allow dedup all process memory
Date: Thu, 14 Sep 2017 17:10:39 +0300	[thread overview]
Message-ID: <20170914141040.9497-1-nefelim4ag@gmail.com> (raw)

Hi, about 3 years ago i firstly write to linux-mm,
when i acking about UKSM and make some ugly patches (like that [1]).

It's difficult to find conversation (for me at least, i only find
my patches).
So IIRC:
 - I trying add support KSM to all process memory
   for that i patch several memory places to call hooks like madvise.
   MM folks not like that and at now i'm not only agree, i can fix that another way.

First i try look at hugepagesd, but hugepages have a much different usecase.
As example it's bad idea add ksm hook to page_fault.

So:
 I use kernel task list in ksm_scan_thread and add logic to allow ksm
 import VMA from tasks.
 That behaviour controlled by new attribute: mode
 I try mimic hugepages attribute, so mode have two states:
  - normal [old default behaviour]
  - always [new] - allow ksm to get tasks vma and try working on that.

To reduce CPU load & tasklist locking time, ksm try import one VMA per loop.

Patch mirror: https://github.com/Nefelim4ag/linux/commit/be6a94e171bf214a26f8186bb76b1d365ccb3b08

Thanks, any comments are appricated!

(Yes i can split patch, but it's RFC and it's too small)

1. https://lkml.org/lkml/2014/11/8/208

Timofey Titovets (1):
  ksm: allow dedup all tasks memory

 Documentation/vm/ksm.txt |   3 +
 mm/ksm.c                 | 139 ++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 121 insertions(+), 21 deletions(-)

--
2.14.1

--
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:[~2017-09-14 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 14:10 Timofey Titovets [this message]
2017-09-14 14:10 ` [RFC PATCH 1/1] ksm: allow dedup all tasks memory 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=20170914141040.9497-1-nefelim4ag@gmail.com \
    --to=nefelim4ag@gmail.com \
    --cc=linux-mm@kvack.org \
    /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