linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM TOPIC]swap improvements for fast SSD
@ 2013-01-22  6:53 Shaohua Li
  2013-01-23  7:58 ` Minchan Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Shaohua Li @ 2013-01-22  6:53 UTC (permalink / raw)
  To: lsf-pc, linux-mm

Hi,

Because of high density, low power and low price, flash storage (SSD) is a good
candidate to partially replace DRAM. A quick answer for this is using SSD as
swap. But Linux swap is designed for slow hard disk storage. There are a lot of
challenges to efficiently use SSD for swap:

1. Lock contentions (swap_lock, anon_vma mutex, swap address space lock)
2. TLB flush overhead. To reclaim one page, we need at least 2 TLB flush. This
overhead is very high even in a normal 2-socket machine.
3. Better swap IO pattern. Both direct and kswapd page reclaim can do swap,
which makes swap IO pattern is interleave. Block layer isn't always efficient
to do request merge. Such IO pattern also makes swap prefetch hard.
4. Swap map scan overhead. Swap in-memory map scan scans an array, which is
very inefficient, especially if swap storage is fast.
5. SSD related optimization, mainly discard support
6. Better swap prefetch algorithm. Besides item 3, sequentially accessed pages
aren't always in LRU list adjacently, so page reclaim will not swap such pages
in adjacent storage sectors. This makes swap prefetch hard.
7. Alternative page reclaim policy to bias reclaiming anonymous page.
Currently reclaim anonymous page is considering harder than reclaim file pages,
so we bias reclaiming file pages. If there are high speed swap storage, we are
considering doing swap more aggressively.
8. Huge page swap. Huge page swap can solve a lot of problems above, but both
THP and hugetlbfs don't support swap.

I had some progresses in these areas recently:
http://marc.info/?l=linux-mm&m=134665691021172&w=2
http://marc.info/?l=linux-mm&m=135336039115191&w=2
http://marc.info/?l=linux-mm&m=135882182225444&w=2
http://marc.info/?l=linux-mm&m=135754636926984&w=2
http://marc.info/?l=linux-mm&m=135754634526979&w=2
But a lot of problems remain. I'd like to discuss the issues at the meeting.

Thanks,
Shaohua

--
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] 31+ messages in thread
[parent not found: <766b9855-adf5-47ce-9484-971f88ff0e54@default>]

end of thread, other threads:[~2013-04-28  8:12 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22  6:53 [LSF/MM TOPIC]swap improvements for fast SSD Shaohua Li
2013-01-23  7:58 ` Minchan Kim
2013-01-23 19:04   ` Seth Jennings
2013-01-24  1:40     ` Minchan Kim
2013-01-24  8:29       ` Simon Jeons
2013-01-24  2:02   ` Shaohua Li
2013-01-24  7:52   ` Simon Jeons
2013-01-24  9:09   ` Simon Jeons
2013-01-26  4:40     ` Kyungmin Park
2013-01-27  0:26       ` Simon Jeons
2013-01-27 14:18       ` Shaohua Li
2013-01-28  7:37         ` Kyungmin Park
2013-02-01 12:37           ` Kyungmin Park
2013-02-04  4:56         ` Hugh Dickins
2013-02-19  6:15           ` Shaohua Li
2013-02-19 19:41             ` Hugh Dickins
2013-04-05  0:17   ` Simon Jeons
2013-04-05  8:08     ` Minchan Kim
2013-01-23 16:56 ` Seth Jennings
2013-01-24  6:28 ` Simon Jeons
2013-03-15  9:39 ` Simon Jeons
2013-03-18 10:38   ` Bob Liu
2013-03-19  1:27     ` Shaohua Li
2013-03-19  1:32       ` Simon Jeons
2013-03-19  5:57         ` Shaohua Li
2013-03-19  6:10           ` Simon Jeons
2013-03-19  4:25       ` Wanpeng Li
2013-03-19  4:25       ` Wanpeng Li
2013-04-28  8:12 ` Simon Jeons
     [not found] <766b9855-adf5-47ce-9484-971f88ff0e54@default>
2013-01-23 23:05 ` Dan Magenheimer
2013-01-24  2:11   ` Shaohua Li

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