linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Wool <vitalywool@gmail.com>
To: Linux-MM <linux-mm@kvack.org>, linux-kernel@vger.kernel.org
Cc: Dan Streetman <ddstreet@ieee.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleksiy.Avramchenko@sony.com,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>
Subject: [PATCHv2 0/4] z3fold: support page migration
Date: Wed, 17 Apr 2019 10:35:10 +0200	[thread overview]
Message-ID: <20190417103510.36b055f3314e0e32b916b30a@gmail.com> (raw)

This patchset implements page migration support and slightly better
buddy search. To implement page migration support, z3fold has to move
away from the current scheme of handle encoding. i. e. stop encoding
page address in handles. Instead, a small per-page structure is created
which will contain actual addresses for z3fold objects, while pointers
to fields of that structure will be used as handles.

Thus, it will be possible to change the underlying addresses to reflect
page migration.

To support migration itself, 3 callbacks will be implemented:
    1: isolation callback: z3fold_page_isolate(): try to isolate
the page by removing it from all lists. Pages scheduled for some
activity and mapped pages will not be isolated. Return true if
isolation was successful or false otherwise
    2: migration callback: z3fold_page_migrate(): re-check critical
conditions and migrate page contents to the new page provided by the
system. Returns 0 on success or negative error code otherwise
    3: putback callback: z3fold_page_putback(): put back the page
if z3fold_page_migrate() for it failed permanently (i. e. not with
-EAGAIN code).

To make sure an isolated page doesn't get freed, its kref is incremented
in z3fold_page_isolate() and decremented during post-migration
compaction, if migration was successful, or by z3fold_page_putback() in
the other case.

Since the new handle encoding scheme implies slight memory consumption
increase, better buddy search (which decreases memory consumption) is
included in this patchset.

Vitaly Wool (4):
  z3fold: introduce helper functions
  z3fold: improve compression by extending search
  z3fold: add structure for buddy handles
  z3fold: support page migration

 mm/z3fold.c |  638 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 508 insertions(+), 130 deletions(-)


             reply	other threads:[~2019-04-17  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17  8:35 Vitaly Wool [this message]
2019-04-17  8:36 ` [PATCHV2 1/4] z3fold: introduce helper functions Vitaly Wool
2019-04-17  8:37 ` [PATCHv2 2/4] z3fold: improve compression by extending search Vitaly Wool
2019-04-17  8:38 ` [PATCHv2 3/4] z3fold: add structure for buddy handles Vitaly Wool
2019-04-17  8:39 ` [PATCHv2 4/4] z3fold: support page migration Vitaly Wool

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=20190417103510.36b055f3314e0e32b916b30a@gmail.com \
    --to=vitalywool@gmail.com \
    --cc=Oleksiy.Avramchenko@sony.com \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=ddstreet@ieee.org \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --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