archive mirror
 help / color / mirror / Atom feed
From: Seth Jennings <>
To: Greg Kroah-Hartman <>
Cc: Seth Jennings <>,
	Andrew Morton <>,
	Nitin Gupta <>, Minchan Kim <>,
	Konrad Rzeszutek Wilk <>,
	Dan Magenheimer <>,
	Xiao Guangrong <>,
	Robert Jennings <>,,,
Subject: [PATCH v2 0/3] promote zcache from staging
Date: Tue,  4 Sep 2012 15:02:46 -0500	[thread overview]
Message-ID: <> (raw)

zcache is the remaining piece of code required to support in-kernel
memory compression.  The other two features, cleancache and frontswap,
have been promoted to mainline in 3.0 and 3.5 respectively.  This
patchset promotes zcache from the staging tree to mainline.

Based on the level of activity and contributions we're seeing from a
diverse set of people and interests, I think zcache has matured to the
point where it makes sense to promote this out of staging.

zcache is a backend to frontswap and cleancache that accepts pages from
those mechanisms and compresses them, leading to reduced I/O caused by
swap and file re-reads.  This is very valuable in shared storage situations
to reduce load on things like SANs.  Also, in the case of slow backing/swap
devices, zcache can also yield a performance gain.

In-Kernel Memory Compression Overview:

 swap subsystem            page cache
        +                      +
    frontswap              cleancache
        +                      +
zcache frontswap glue  zcache cleancache glue
        +                      +
            zcache/tmem core
        +                      +
     zsmalloc                 zbud

Everything below the frontswap/cleancache layer is current inside the
zcache driver expect for zsmalloc which is a shared between zcache and
another memory compression driver, zram.

Since zcache is dependent on zsmalloc, it is also being promoted by this

For information on zsmalloc and the rationale behind it's design and use
cases verses already existing allocators in the kernel:

zsmalloc is the allocator used by zcache to store persistent pages that
comes from frontswap, as opposed to zbud which is the (internal) allocator
used for ephemeral pages from cleancache.

zsmalloc uses many fields of the page struct to create it's conceptual
high-order page called a zspage.  Exactly which fields are used and for
what purpose is documented at the top of the zsmalloc .c file.  Because
zsmalloc uses struct page extensively, Andrew advised that the
promotion location be mm/:

Some benchmarking numbers demonstrating the I/O saving that can be had
with zcache:

Dan's presentation at LSF/MM this year on zcache:

There was a recent thread about cleancache memory corruption that is
resolved by this patch that should be making it into linux-next via
Greg very soon:

	* rebased to next-20120904
	* removed already accepted patch from patchset

Seth Jennings (3):
  zsmalloc: promote to mm/
  drivers: add memory management driver class
  zcache: promote to drivers/mm/

 drivers/Kconfig                                    |    2 ++
 drivers/Makefile                                   |    1 +
 drivers/mm/Kconfig                                 |   13 +++++++++++++
 drivers/mm/Makefile                                |    1 +
 drivers/{staging => mm}/zcache/Makefile            |    0
 drivers/{staging => mm}/zcache/tmem.c              |    0
 drivers/{staging => mm}/zcache/tmem.h              |    0
 drivers/{staging => mm}/zcache/zcache-main.c       |    4 ++--
 drivers/staging/Kconfig                            |    4 ----
 drivers/staging/Makefile                           |    2 --
 drivers/staging/zcache/Kconfig                     |   11 -----------
 drivers/staging/zram/zram_drv.h                    |    3 +--
 drivers/staging/zsmalloc/Kconfig                   |   10 ----------
 drivers/staging/zsmalloc/Makefile                  |    3 ---
 .../staging/zsmalloc => include/linux}/zsmalloc.h  |    0
 mm/Kconfig                                         |   18 ++++++++++++++++++
 mm/Makefile                                        |    1 +
 .../zsmalloc/zsmalloc-main.c => mm/zsmalloc.c      |    3 +--
 18 files changed, 40 insertions(+), 36 deletions(-)
 create mode 100644 drivers/mm/Kconfig
 create mode 100644 drivers/mm/Makefile
 rename drivers/{staging => mm}/zcache/Makefile (100%)
 rename drivers/{staging => mm}/zcache/tmem.c (100%)
 rename drivers/{staging => mm}/zcache/tmem.h (100%)
 rename drivers/{staging => mm}/zcache/zcache-main.c (99%)
 delete mode 100644 drivers/staging/zcache/Kconfig
 delete mode 100644 drivers/staging/zsmalloc/Kconfig
 delete mode 100644 drivers/staging/zsmalloc/Makefile
 rename {drivers/staging/zsmalloc => include/linux}/zsmalloc.h (100%)
 rename drivers/staging/zsmalloc/zsmalloc-main.c => mm/zsmalloc.c (99%)


             reply	other threads:[~2012-09-04 20:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 20:02 Seth Jennings [this message]
2012-09-04 19:57 ` [PATCH v2 0/3] promote zcache from staging Konrad Rzeszutek Wilk
2012-09-04 20:11   ` Andrew Morton
2012-09-04 20:11   ` Seth Jennings
2012-09-04 20:02 ` [PATCH v2 1/3] zsmalloc: promote to mm/ Seth Jennings
2012-09-04 20:02 ` [PATCH v2 2/3] drivers: add memory management driver class Seth Jennings
2012-09-04 20:02 ` [PATCH v2 3/3] zcache: promote to drivers/mm/ Seth Jennings

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).