All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] mm: frontswap (for 3.2 window)
@ 2011-10-27 18:52 ` Dan Magenheimer
  0 siblings, 0 replies; 175+ messages in thread
From: Dan Magenheimer @ 2011-10-27 18:52 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-mm, LKML, Andrew Morton, Konrad Wilk, Jeremy Fitzhardinge,
	Seth Jennings, ngupta, levinsasha928, Chris Mason, JBeulich,
	Dave Hansen, Jonathan Corbet, Neo Jia

Hi Linus --

Frontswap now has FOUR users: Two already merged in-tree (zcache
and Xen) and two still in development but in public git trees
(RAMster and KVM).  Frontswap is part 2 of 2 of the core kernel
changes required to support transcendent memory; part 1 was cleancache
which you merged at 3.0 (and which now has FIVE users).

Frontswap patches have been in linux-next since June 3 (with zero
changes since Sep 22).  First posted to lkml in June 2009, frontswap 
is now at version 11 and has incorporated feedback from a wide range
of kernel developers.  For a good overview, see
   http://lwn.net/Articles/454795.
If further rationale is needed, please see the end of this email
for more info.

SO... Please pull:

git://oss.oracle.com/git/djm/tmem.git #tmem

since git commit b6fd41e29dea9c6753b1843a77e50433e6123bcb
Linus Torvalds (1):

	Linux 3.1-rc6

(identical commits being pulled by sfr into linux-next since Sep22)

Note that in addition to frontswap, this commit series includes
some minor changes to cleancache necessary for consistency with
changes for frontswap required by Andrew Morton (e.g. flush->invalidate
name change; use debugfs instead of sysfs).  As a result, a handful
of cleancache-related VFS files incur only a very small change.

Dan Magenheimer (8):
      mm: frontswap: add frontswap header file
      mm: frontswap: core swap subsystem hooks and headers
      mm: frontswap: core frontswap functionality
      mm: frontswap: config and doc files
      mm: cleancache: s/flush/invalidate/
      mm: frontswap/cleancache: s/flush/invalidate/
      mm: cleancache: report statistics via debugfs instead of sysfs.
      mm: cleancache: Use __read_mostly as appropiate.

Diffstat:
 .../ABI/testing/sysfs-kernel-mm-cleancache         |   11 -
 Documentation/vm/cleancache.txt                    |   41 ++--
 Documentation/vm/frontswap.txt                     |  210 +++++++++++++++
 drivers/staging/zcache/zcache-main.c               |   10 +-
 drivers/xen/tmem.c                                 |   10 +-
 fs/buffer.c                                        |    2 +-
 fs/super.c                                         |    2 +-
 include/linux/cleancache.h                         |   24 +-
 include/linux/frontswap.h                          |    9 +-
 include/linux/swap.h                               |    4 +
 include/linux/swapfile.h                           |   13 +
 mm/Kconfig                                         |   17 ++
 mm/Makefile                                        |    1 +
 mm/cleancache.c                                    |   98 +++-----
 mm/filemap.c                                       |    2 +-
 mm/frontswap.c                                     |  273 ++++++++++++++++++++
 mm/page_io.c                                       |   12 +
 mm/swapfile.c                                      |   64 ++++-
 mm/truncate.c                                      |   10 +-
 19 files changed, 672 insertions(+), 141 deletions(-)

====

FURTHER RATIONALE, INFORMATION, AND LINKS:

In-kernel users (grep for CONFIG_FRONTSWAP):
- drivers/staging/zcache (since 2.6.39)
- drivers/xen/tmem.c (since 3.1)
- drivers/xen/xen-selfballoon.c (since 3.1)

Users in development in public git trees:
- "RAMster" driver, see ramster branch of
    git://oss.oracle.com/git/djm/tmem.git
- KVM port now underway, see:
    https://github.com/sashalevin/kvm-tmem/commits/tmem 

History of frontswap code:
- code first written in Dec 2008
- previously known as "hswap" and "preswap"
- first public posting in Feb 2009
- first LKML posting on June 19, 2009
- renamed frontswap, posted on May 28, 2010
- in linux-next since June 3, 2011
- incorporated feedback from: (partial list)
   Andrew Morton, Jan Beulich, Konrad Wilk,
    Jeremy Fitzhardinge, Kamezawa Hiroyuki,
    Seth Jennings (IBM)

Linux kernel distros incorporating frontswap:
- Oracle UEK 2.6.39 Beta:
   http://oss.oracle.com/git/?p=linux-2.6-unbreakable-beta.git;a=summary 
- OpenSuSE since 11.2 (2009) [see mm/tmem-xen.c]
   http://kernel.opensuse.org/cgit/kernel/ 
- a popular Gentoo distro
   http://forums.gentoo.org/viewtopic-t-862105.html 

Xen distros supporting Linux guests with frontswap:
- Xen hypervisor backend since Xen 4.0 (2009)
   http://www.xen.org/files/Xen_4_0_Datasheet.pdf 
- OracleVM since 2.2 (2009)
   http://twitter.com/#!/Djelibeybi/status/113876514688352256 

Public visibility for frontswap (as part of transcendent memory):
- presented at OSDI'08, OLS'09, LCA'10, LPC'10, LinuxCon NA 11, Oracle
  Open World 2011, two LSF/MM Summits (2010,2011), and three
  Xen Summits (2009,2010,2011)
- http://lwn.net/Articles/454795 (current overview)
- http://lwn.net/Articles/386090 (2010)
- http://lwn.net/Articles/340080 (2009)

^ permalink raw reply	[flat|nested] 175+ messages in thread
* Re: [GIT PULL] mm: frontswap (for 3.2 window)
@ 2011-11-04 12:37 Clayton Weaver
  0 siblings, 0 replies; 175+ messages in thread
From: Clayton Weaver @ 2011-11-04 12:37 UTC (permalink / raw)
  To: linux-kernel

"So where I can I buy Network Attached Ram and skip all of
this byzantine VM complication?"

So let me see if I have this right: when the frontswap
back end fills up, the current design would force dumping
newer pages to real on-disk swap (to avoid OOM), possibly
compressed, while keeping older pages in the compressed
ram swap cache? It seems like it should just dump
(blocksize/pagesize) * pagesize multiples of its oldest
compressed pages to disk instead and store and compress
the new pages that are submitted to it, thus preserving
the "least recently used" logic in the frontswap backend.

A backend to frontswap should not be able to fail a put
at all (unless the whole machine or container is OOM and
no physical swap is configured, so the backend contains
no pages and has no space to allocate from).

-- 

Clayton Weaver
cgweav at fastmail dot fm


^ permalink raw reply	[flat|nested] 175+ messages in thread
* Re: [GIT PULL] mm: frontswap (for 3.2 window)
@ 2011-11-05 17:08 Clayton Weaver
  0 siblings, 0 replies; 175+ messages in thread
From: Clayton Weaver @ 2011-11-05 17:08 UTC (permalink / raw)
  To: linux-kernel

(NB: My only dog in this hunt is the length of this thread.)

When swapping to rotating media, all swapped pages have the same
age. Is there any performance reason to keep this property when
swapping to in-memory swap space that has rotating media or
some other longer-latency swap space for worst-case swap storage?
Is there any performance reason to extend lru logic to this type
of low-latency/high-latency swap?

Seems like an obvious question.

Will all of these potential frontswap backends want page compression?
(Should it be factored out into a common page compression
implementation that anything can use? Does this already exist? How
many pages should it operate on at one time, batched together to get
higher average compression ratios?)
-- 

Clayton Weaver
cgweav at fastmail dot fm


^ permalink raw reply	[flat|nested] 175+ messages in thread

end of thread, other threads:[~2011-11-16 14:51 UTC | newest]

Thread overview: 175+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 18:52 [GIT PULL] mm: frontswap (for 3.2 window) Dan Magenheimer
2011-10-27 18:52 ` Dan Magenheimer
     [not found] ` <alpine.DEB.2.00.1110271318220.7639@chino.kir.corp.google.com20111027211157.GA1199@infradead.org>
2011-10-27 19:30 ` Kurt Hackel
2011-10-27 19:30   ` Kurt Hackel
2011-10-27 20:18 ` David Rientjes
2011-10-27 20:18   ` David Rientjes
2011-10-27 21:11   ` Christoph Hellwig
2011-10-27 21:11     ` Christoph Hellwig
2011-10-27 21:49     ` Dan Magenheimer
2011-10-27 21:49       ` Dan Magenheimer
2011-10-27 21:52       ` Christoph Hellwig
2011-10-27 21:52         ` Christoph Hellwig
2011-10-27 22:21         ` Dan Magenheimer
2011-10-27 22:21           ` Dan Magenheimer
2011-10-28  7:12         ` Sasha Levin
2011-10-28  7:12           ` Sasha Levin
     [not found]           ` <CAOzbF4fnD=CGR-nizZoBxmFSuAjFC3uAHf3wDj5RLneJvJhrOQ@mail.gmail.comCAOJsxLGOTw7rtFnqeHvzFxifA0QgPVDHZzrEo=-uB2Gkrvp=JQ@mail.gmail.com>
     [not found]             ` <552d2067-474d-4aef-a9a4-89e5fd8ef84f@default20111031181651.GF3466@redhat.com>
     [not found]               ` <60592afd-97aa-4eaf-b86b-f6695d31c7f1@default20111031223717.GI3466@redhat.com>
     [not found]                 ` <1b2e4f74-7058-4712-85a7-84198723e3ee@default20111101012017.GJ3466@redhat.com>
     [not found]                   ` <6a9db6d9-6f13-4855-b026-ba668c29ddfa@default20111101180702.GL3466@redhat.com>
     [not found]                     ` <b8a0ca71-a31b-488a-9a92-2502d4a6e9bf@default20111102013122.GA18879@redhat.com>
2011-10-28  7:30           ` Cyclonus J
2011-10-28  7:30             ` Cyclonus J
2011-10-28 14:26             ` Pekka Enberg
2011-10-28 14:26               ` Pekka Enberg
2011-10-28 15:21               ` Dan Magenheimer
2011-10-28 15:21                 ` Dan Magenheimer
     [not found]                 ` <CAOJsxLEE-qf9me1SAZLFiEVhHVnDh7BDrSx1+abe9R4mfkhD=g@mail.gmail.com20111028163053.GC1319@redhat.com>
2011-10-28 15:36                 ` Pekka Enberg
2011-10-28 15:36                   ` Pekka Enberg
2011-10-28 16:30                   ` Johannes Weiner
2011-10-28 16:30                     ` Johannes Weiner
2011-10-28 17:01                     ` Pekka Enberg
2011-10-28 17:01                       ` Pekka Enberg
2011-10-28 17:07                     ` Dan Magenheimer
2011-10-28 17:07                       ` Dan Magenheimer
2011-10-28 18:28                       ` John Stoffel
2011-10-28 18:28                         ` John Stoffel
2011-10-28 20:19                         ` Dan Magenheimer
2011-10-28 20:19                           ` Dan Magenheimer
2011-10-28 20:52                           ` John Stoffel
2011-10-28 20:52                             ` John Stoffel
2011-10-30 19:18                             ` Dan Magenheimer
2011-10-30 19:18                               ` Dan Magenheimer
2011-10-30 20:06                               ` Dave Hansen
2011-10-30 20:06                                 ` Dave Hansen
2011-10-30 21:50                                 ` Dan Magenheimer
2011-10-30 21:50                                   ` Dan Magenheimer
2011-11-02 19:45                                 ` Rik van Riel
2011-11-02 19:45                                   ` Rik van Riel
2011-11-02 20:45                                   ` Dan Magenheimer
2011-11-02 20:45                                     ` Dan Magenheimer
2011-11-06 22:32                             ` Valdis.Kletnieks
2011-11-08 12:15                               ` Ed Tomlinson
2011-11-08 12:15                                 ` Ed Tomlinson
2011-10-31  8:12                           ` James Bottomley
2011-10-31  8:12                             ` James Bottomley
2011-10-31 15:39                             ` Dan Magenheimer
2011-10-31 15:39                               ` Dan Magenheimer
2011-11-01 10:13                               ` James Bottomley
2011-11-01 10:13                                 ` James Bottomley
2011-11-01 18:10                                 ` Dan Magenheimer
2011-11-01 18:10                                   ` Dan Magenheimer
2011-11-01 18:48                                   ` Dave Hansen
2011-11-01 18:48                                     ` Dave Hansen
2011-11-01 21:32                                     ` Dan Magenheimer
2011-11-01 21:32                                       ` Dan Magenheimer
2011-11-02  7:44                                   ` James Bottomley
2011-11-02  7:44                                     ` James Bottomley
2011-11-02 19:39                                     ` Dan Magenheimer
2011-11-02 19:39                                       ` Dan Magenheimer
2011-10-31 18:44                         ` Andrea Arcangeli
2011-10-31 18:44                           ` Andrea Arcangeli
2011-10-30 21:47                       ` Johannes Weiner
2011-10-30 21:47                         ` Johannes Weiner
2011-10-30 23:19                         ` Dan Magenheimer
2011-10-30 23:19                           ` Dan Magenheimer
2011-10-31 18:34                       ` Andrea Arcangeli
2011-10-31 18:34                         ` Andrea Arcangeli
2011-10-31 21:45                         ` Dan Magenheimer
2011-10-31 21:45                           ` Dan Magenheimer
2011-10-28 16:37                   ` Dan Magenheimer
2011-10-28 16:37                     ` Dan Magenheimer
2011-10-28 16:59                     ` Pekka Enberg
2011-10-28 16:59                       ` Pekka Enberg
2011-10-28 17:20                       ` Dan Magenheimer
2011-10-28 17:20                         ` Dan Magenheimer
2011-10-31 18:16                 ` Andrea Arcangeli
2011-10-31 18:16                   ` Andrea Arcangeli
2011-10-31 20:58                   ` Dan Magenheimer
2011-10-31 20:58                     ` Dan Magenheimer
2011-10-31 22:37                     ` Andrea Arcangeli
2011-10-31 22:37                       ` Andrea Arcangeli
2011-10-31 23:36                       ` Dan Magenheimer
2011-10-31 23:36                         ` Dan Magenheimer
2011-11-01  1:20                         ` Andrea Arcangeli
2011-11-01  1:20                           ` Andrea Arcangeli
2011-11-01 16:41                           ` Dan Magenheimer
2011-11-01 16:41                             ` Dan Magenheimer
2011-11-01 18:07                             ` Andrea Arcangeli
2011-11-01 18:07                               ` Andrea Arcangeli
2011-11-01 21:00                               ` Dan Magenheimer
2011-11-01 21:00                                 ` Dan Magenheimer
2011-11-02  1:31                                 ` Andrea Arcangeli
2011-11-02  1:31                                   ` Andrea Arcangeli
2011-11-02 19:06                                   ` Dan Magenheimer
2011-11-02 19:06                                     ` Dan Magenheimer
2011-11-03  0:32                                     ` Andrea Arcangeli
2011-11-03  0:32                                       ` Andrea Arcangeli
2011-11-03 22:29                                       ` Dan Magenheimer
2011-11-03 22:29                                         ` Dan Magenheimer
2011-11-02 20:51                         ` Rik van Riel
2011-11-02 20:51                           ` Rik van Riel
2011-11-02 21:14                           ` Dan Magenheimer
2011-11-02 21:14                             ` Dan Magenheimer
2011-11-15 16:29                             ` Rik van Riel
2011-11-15 16:29                               ` Rik van Riel
2011-11-15 17:33                               ` Jeremy Fitzhardinge
2011-11-15 17:33                                 ` Jeremy Fitzhardinge
2011-11-16 14:49                                 ` Konrad Rzeszutek Wilk
2011-11-16 14:49                                   ` Konrad Rzeszutek Wilk
2011-11-01 10:16                   ` James Bottomley
2011-11-01 10:16                     ` James Bottomley
2011-11-01 18:21                     ` Dan Magenheimer
2011-11-01 18:21                       ` Dan Magenheimer
2011-11-02  8:14                       ` James Bottomley
2011-11-02  8:14                         ` James Bottomley
2011-11-02 20:08                         ` Dan Magenheimer
2011-11-02 20:08                           ` Dan Magenheimer
2011-11-03 10:30                           ` Theodore Tso
2011-11-03 10:30                             ` Theodore Tso
2011-11-03 14:59                             ` Dan Magenheimer
2011-11-03 14:59                               ` Dan Magenheimer
2011-11-02 15:44                     ` Avi Kivity
2011-11-02 15:44                       ` Avi Kivity
2011-11-02 16:02                       ` Andrea Arcangeli
2011-11-02 16:02                         ` Andrea Arcangeli
2011-11-02 16:13                         ` Avi Kivity
2011-11-02 16:13                           ` Avi Kivity
2011-11-02 20:27                           ` Dan Magenheimer
2011-11-02 20:27                             ` Dan Magenheimer
2011-11-02 20:19                       ` Dan Magenheimer
2011-11-02 20:19                         ` Dan Magenheimer
2011-10-27 21:44 ` Avi Miller
2011-10-27 21:44   ` Avi Miller
2011-10-27 22:33 ` Brian King
2011-10-27 22:33   ` Brian King
2011-10-28  5:17 ` Nitin Gupta
2011-10-28  5:17   ` Nitin Gupta
2011-10-29 13:43 ` Ed Tomlinson
2011-10-29 13:43   ` Ed Tomlinson
2011-10-31  8:13 ` KAMEZAWA Hiroyuki
2011-10-31  8:13   ` KAMEZAWA Hiroyuki
2011-10-31 16:38   ` Dan Magenheimer
2011-10-31 16:38     ` Dan Magenheimer
2011-11-01  0:50     ` KAMEZAWA Hiroyuki
2011-11-01  0:50       ` KAMEZAWA Hiroyuki
2011-11-01 15:25       ` Dan Magenheimer
2011-11-01 15:25         ` Dan Magenheimer
2011-11-01 21:43         ` Andrew Morton
2011-11-01 21:43           ` Andrew Morton
2011-11-01 22:25           ` Dan Magenheimer
2011-11-01 22:25             ` Dan Magenheimer
2011-11-02 21:03           ` Rik van Riel
2011-11-02 21:03             ` Rik van Riel
2011-11-02 21:42             ` Dan Magenheimer
2011-11-02 21:42               ` Dan Magenheimer
2011-11-02  1:14         ` KAMEZAWA Hiroyuki
2011-11-02  1:14           ` KAMEZAWA Hiroyuki
2011-11-02 15:12           ` Dan Magenheimer
2011-11-02 15:12             ` Dan Magenheimer
2011-11-04  4:19             ` KAMEZAWA Hiroyuki
2011-11-04  4:19               ` KAMEZAWA Hiroyuki
2011-11-03 16:49 ` Jan Beulich
2011-11-03 16:49   ` Jan Beulich
2011-11-04  0:54   ` Andrew Morton
2011-11-04  0:54     ` Andrew Morton
2011-11-04  8:49     ` Jan Beulich
2011-11-04  8:49       ` Jan Beulich
2011-11-04 12:37 Clayton Weaver
2011-11-05 17:08 Clayton Weaver

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.