linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kyungmin Park <kmpark@infradead.org>
To: Shaohua Li <shli@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>,
	lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	Rik van Riel <riel@redhat.com>,
	Simon Jeons <simon.jeons@gmail.com>
Subject: Re: [LSF/MM TOPIC]swap improvements for fast SSD
Date: Mon, 28 Jan 2013 16:37:14 +0900	[thread overview]
Message-ID: <CAH9JG2UTnAKHp8FB4rzYDD8VbQ-8S4=j_nAkOwXO4+2HeVrLwQ@mail.gmail.com> (raw)
In-Reply-To: <20130127141853.GB27019@kernel.org>

On Sun, Jan 27, 2013 at 11:18 PM, Shaohua Li <shli@kernel.org> wrote:
> On Sat, Jan 26, 2013 at 01:40:55PM +0900, Kyungmin Park wrote:
>> Hi,
>>
>> On 1/24/13, Simon Jeons <simon.jeons@gmail.com> wrote:
>> > Hi Minchan,
>> > On Wed, 2013-01-23 at 16:58 +0900, Minchan Kim wrote:
>> >> On Tue, Jan 22, 2013 at 02:53:41PM +0800, Shaohua Li wrote:
>> >> > 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:
>> >>
>> >> Many of below item could be applied in in-memory swap like zram, zcache.
>> >>
>> >> >
>> >> > 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.
>> >>
>> >> Agreed.
>> >>
>> >> > 4. Swap map scan overhead. Swap in-memory map scan scans an array, which
>> >> > is
>> >> > very inefficient, especially if swap storage is fast.
>> >>
>> >> Agreed.
>> >>
>>
>> 5. SSD related optimization, mainly discard support.
>>
>> Now swap codes are based on each swap slots. it means it can't
>> optimize discard feature since getting meaningful performance gain, it
>> requires 2 pages at least. Of course it's based on eMMC. In case of
>> SSD. it requires more pages to support discard.
>>
>> To address issue. I consider the batched discard approach used at filesystem.
>> *Sometime* scan all empty slot and it issues discard continuous swap
>> slots as many as possible.
>
> I posted a patch to make discard async before, which is almost good to me, though we
> still discard a cluster.
> http://marc.info/?l=linux-mm&m=135087309208120&w=2

I found your previous patches, It's almost same concept as batched
discard. Now I'm testing your patches.
BTW, which test program do you use? Now we just testing some scenario
and check scenario only.
There's no generic tool to measure improved performance gain.

After test, I'll share the results.

Thank you,
Kyungmin Park

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

  reply	other threads:[~2013-01-28  7:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  6:53 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 [this message]
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

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAH9JG2UTnAKHp8FB4rzYDD8VbQ-8S4=j_nAkOwXO4+2HeVrLwQ@mail.gmail.com' \
    --to=kmpark@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=shli@kernel.org \
    --cc=simon.jeons@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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