lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 13 Nov 2013 09:40:22 -0600
From:	Seth Jennings <sjennings@...iantweb.net>
To:	Dan Streetman <ddstreet@...e.org>
Cc:	linux-mm@...ck.org, linux-kernel <linux-kernel@...r.kernel.org>,
	minchan@...nel.org, bob.liu@...cle.com, weijie.yang@...sung.com,
	k.kozlowski@...sung.com
Subject: Re: mm/zswap: change to writethrough

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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists