linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Seth Jennings <sjennings@variantweb.net>
To: Dan Streetman <ddstreet@ieee.org>
Cc: linux-mm@kvack.org, linux-kernel <linux-kernel@vger.kernel.org>,
	minchan@kernel.org, bob.liu@oracle.com, weijie.yang@samsung.com,
	k.kozlowski@samsung.com
Subject: Re: mm/zswap: change to writethrough
Date: Wed, 13 Nov 2013 09:40:22 -0600	[thread overview]
Message-ID: <20131113154022.GA6277@cerebellum.variantweb.net> (raw)
In-Reply-To: <CALZtONAxsYxLizARV3Aam_n7534g5gh_FFkTz6jb-0Q9gThuBQ@mail.gmail.com>

On Mon, Nov 11, 2013 at 02:12:12PM -0500, 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.

There are two main benefits to zswap:
1) avoid write to swap space while the compressed pool is not full and
2) reduce application delay on anonymous page faults

Doing a writethough approach eliminates benefit 1 as there would
be just as much swap out activity with or without zswap.  However, you
still retain benefit 2.

The reclaim from zswap also becomes much simplier if the the compressed
page can be treated as clean.  It doesn't need to be written back and
can just be freed and the bit in the frontswap_map unset.

I'm not opposed to this.  The obstacle of writeback has influenced the
design a lot more than I would have liked.  You do lose the benefit of
decreased swap out traffic, but the real performance killer, application
latency on an anonymous page fault, is still greatly improved.

Seth

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

      parent reply	other threads:[~2013-11-13 15:40 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
2013-11-13 15:40 ` Seth Jennings [this message]

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=20131113154022.GA6277@cerebellum.variantweb.net \
    --to=sjennings@variantweb.net \
    --cc=bob.liu@oracle.com \
    --cc=ddstreet@ieee.org \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --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