linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: Bob Liu <bob.liu@oracle.com>
Cc: sjennings@variantweb.net, linux-mm@kvack.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	minchan@kernel.org, weijie.yang@samsung.com,
	k.kozlowski@samsung.com, konrad.wilk@oracle.com
Subject: Re: mm/zswap: change to writethrough
Date: Tue, 12 Nov 2013 09:24:55 -0500	[thread overview]
Message-ID: <CALZtONDAitXFfQWPfWG2Qy03NY7Q-2Asch0xQn0FEa-A6oNZTg@mail.gmail.com> (raw)
In-Reply-To: <5281F0B4.8060902@oracle.com>

On Tue, Nov 12, 2013 at 4:11 AM, Bob Liu <bob.liu@oracle.com> wrote:
>
> On 11/12/2013 03:12 AM, Dan Streetman wrote:
>> Seth, have you (or anyone else) considered making zswap a writethrough
>> cache instead of writeback?  I think that it would significantly help
>> the case where zswap fills up and starts writing back its oldest pages
>> to disc - all the decompression work would be avoided since zswap
>> could just evict old pages and forget about them, and it seems likely
>> that when zswap is full that's probably the worst time to add extra
>> work/delay, while adding extra disc IO (presumably using dma) before
>> zswap is full doesn't seem to me like it would have much impact,
>> except in the case where zswap isn't full but there is so little free
>> memory that new allocs are waiting on swap-out.
>>
>> Besides the additional disc IO that obviously comes with making zswap
>> writethrough (additional only before zswap fills up), are there any
>> other disadvantages?  Is it a common situation for there to be no
>> memory left and get_free_page actively waiting on swap-out, but before
>> zswap fills up?
>>
>> Making it writethrough also could open up other possible improvements,
>> like making the compression and storage of new swap-out pages async,
>> so the compression doesn't delay the write out to disc.
>>
>
> I like this idea and those benefits, the only question I'm not sure is
> would it be too complicate to implement this feature? It sounds like we
> need to reimplement something like swapcache to handle zswap write through.

Simply converting to writethrough should be as easy as returning
non-zero from zswap_frontswap_store(), although
zswap_writeback_entry() also needs simplification to skip the
writeback.  I think it shouldn't be difficult; I'll start working on a
first pass of a patch.

Thanks!

--
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-11-12 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 19:12 Dan Streetman
2013-11-12  9:11 ` Bob Liu
2013-11-12 14:24   ` Dan Streetman [this message]
2013-11-13 15:40 ` Seth Jennings

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=CALZtONDAitXFfQWPfWG2Qy03NY7Q-2Asch0xQn0FEa-A6oNZTg@mail.gmail.com \
    --to=ddstreet@ieee.org \
    --cc=bob.liu@oracle.com \
    --cc=k.kozlowski@samsung.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=sjennings@variantweb.net \
    --cc=weijie.yang@samsung.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