Skip to content

skip swapcache for super fast device

Minchan Kim linux-mm lkml 3 versions – Applied

Status from this message: [merged] mm-swap-skip-swapcache-for-swapin-of-synchronous-device.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/24 patches 4 repliesApplied 4/4
  2. v2 posting 1/24 patches 2 repliesSuperseded
  3. v15 patches 15 repliesSuperseded

Patches in v2 posting 2/2 All 4 applied

#Subject and filesSizeRepliesApplied
1/4zram: set BDI_CAP_STABLE_WRITES oncedrivers/block/zram/zram_drv.c+6 -100 repliesApplied
2/4bdi: introduce BDI_CAP_SYNCHRONOUS_IOdrivers/block/brd.c drivers/block/zram/zram_drv.c drivers/nvdimm/btt.c +2 more+16 -10 repliesApplied
3/4mm:swap: introduce SWP_SYNCHRONOUS_IOinclude/linux/swap.h mm/swapfile.c+5 -10 repliesApplied
4/4mm:swap: skip swapcache for swapin of synchronous deviceinclude/linux/swap.h mm/memory.c mm/page_io.c +1 more+57 -234 repliesApplied

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchSergey Senozhatsky
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] skip swapcache for super fast device

With fast swap storage, platform want to use swap more aggressively and swap-in is crucial to application latency.

The rw_page based synchronous devices like zram, pmem and btt are such fast storage. When I profile swapin performance with zram lz4 decompress test, S/W overhead is more than 70%. Maybe, it would be bigger in nvdimm.

This patch aims for reducing swap-in latency via skipping swapcache if swap device is synchronous device like rw_page based device.

It enhances 45% my swapin test(5G sequential swapin, no readahead, from 2.41sec to 1.64sec).

Andrew, [1] is zram specific patch so could be applied separately but this patch is based on that so I include it in this series.

* From v1
* style fix
* a bug fix
* drop page-cluster based readahead off
* This regression could be solved by other patch from Huang.
http://lkml.kernel.org/r/[email protected]

Minchan Kim (4):
[1] zram: set BDI_CAP_STABLE_WRITES once
[2] bdi: introduce BDI_CAP_SYNCHRONOUS_IO
[3] mm:swap: introduce SWP_SYNCHRONOUS_IO
[4] mm:swap: skip swapcache for swapin of synchronous device

 drivers/block/brd.c           |  2 ++
 drivers/block/zram/zram_drv.c | 16 +++++--------
 drivers/nvdimm/btt.c          |  3 +++
 drivers/nvdimm/pmem.c         |  2 ++
 include/linux/backing-dev.h   |  8 +++++++
 include/linux/swap.h          | 14 +++++++++++-
 mm/memory.c                   | 52 ++++++++++++++++++++++++++++++-------------
 mm/page_io.c                  |  6 ++---
 mm/swapfile.c                 | 14 ++++++++----
 9 files changed, 83 insertions(+), 34 deletions(-)
Signature · 7 lines
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>