Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/4] skip swapcache for super fast device
@ 2017-09-20  5:43 Minchan Kim
  2017-09-20  5:43 ` [PATCH v2 1/4] zram: set BDI_CAP_STABLE_WRITES once Minchan Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Minchan Kim @ 2017-09-20  5:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, kernel-team, Christoph Hellwig, Minchan Kim

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/87tw04in60.fsf@yhuang-dev.intel.com
  
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(-)

-- 
2.7.4

--
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>

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH v2 0/4] skip swapcache for super fast device
@ 2017-09-19  7:09 Minchan Kim
  0 siblings, 0 replies; 10+ messages in thread
From: Minchan Kim @ 2017-09-19  7:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kernel-team, linux-kernel, linux-mm, Minchan Kim

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/87tw04in60.fsf@yhuang-dev.intel.com
  
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(-)

-- 
2.7.4

--
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>

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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20  5:43 [PATCH v2 0/4] skip swapcache for super fast device Minchan Kim
2017-09-20  5:43 ` [PATCH v2 1/4] zram: set BDI_CAP_STABLE_WRITES once Minchan Kim
2017-09-20  5:43 ` [PATCH v2 2/4] bdi: introduce BDI_CAP_SYNCHRONOUS_IO Minchan Kim
2017-09-20  5:43 ` [PATCH v2 3/4] mm:swap: introduce SWP_SYNCHRONOUS_IO Minchan Kim
2017-09-20  5:43 ` [PATCH v2 4/4] mm:swap: skip swapcache for swapin of synchronous device Minchan Kim
2017-09-29  8:51   ` huang ying
2017-10-09  1:26     ` huang ying
2017-10-10  0:34     ` Minchan Kim
2017-10-10  1:10       ` Huang, Ying
  -- strict thread matches above, loose matches on Subject: below --
2017-09-19  7:09 [PATCH v2 0/4] skip swapcache for super fast device Minchan Kim

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git