Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610266

Re: [PATCH 4/4] zram: make deduplication feature optional

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] zram: make deduplication feature optional
Date Tue, 28 Mar 2017 04:40:01 +0200
Message-ID <tpPd7-VD-3@gated-at.bofh.it> (permalink)
References <tltEd-8qE-3@gated-at.bofh.it> <tltEd-8qE-9@gated-at.bofh.it> <tnC0G-2r8-3@gated-at.bofh.it> <to1ip-4sJ-3@gated-at.bofh.it> <tpy2C-51D-5@gated-at.bofh.it> <tpNO1-8qP-1@gated-at.bofh.it>
X-Original-To Joonsoo Kim <iamjoonsoo.kim@lge.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eZerTjU2Og4YfqWwHMqxVTgVGLYhba5l9TCrXbUYGd0=; b=LdLC6vaWvI1D/cNeBThhEYaePDOFwk33iB+semGZ1MI22+GzBU5J/xW+MHMhCE2K/N YAut7nRjLnDXZqbLYz/3BpBkW8uPnCVQhsMMT3BEn1i8g+DjKPpZwXnFBWvI39Tc9JfU TW4/YsWyUUUkbZEg1+Wfv4WfZTNSsU1C3r8VbgEYarBbvSj7LnsaADewVSyaKUGnzsTE KmJuKCnlW8uYe3YBApfj1Zcck4pbHFRo/tMCpx3CcwBD4bxos6znk15npRT7nLFDwgI1 2XvuOSlNmyEmm0/a2CMF97bdhDXfy76YazcGUP1hz66Qn0htfFLdmPk3YNZRqu8s0OOF r8lg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eZerTjU2Og4YfqWwHMqxVTgVGLYhba5l9TCrXbUYGd0=; b=iUHU8q+SS22S6Hn/DhQacUB2LmUOqNLhWolgF8gxQreyr9F+sNPzse3s/04oTJz3cN GVzgZ5G48pPdVRFPZSXDu3Lv1eOv2dZEAOIIILCsmUaRphC4cwAexUeIO0rYMBm5HKyS VIzkhGa+XOTkbJh1NPq0iR5AmbPAHNEl5rm0xigvgE4J5nV52A7vpCdqkH7+VZ5EaaWT +nfEs/ai3LBNMh+n6FiAWuEPDc0v4iONAvLxX0FHh8m6ajPkWjGwQnGKlE2BZuVwGTeK 7sV80dyYvDe2ietlEMoBdLo/UXsNkocPUcAWf+XxP8XC5+53VLeIG2S2wmQgg6UiJ4pw afZw==
X-Gm-Message-State AFeK/H3gm5qoAM4LrcWVV2dTTQ25IbPILdVdIZZ+/ZvMe88YCc94Fi9DbDDhrMVvBVIJWQ==
X-Received by 10.98.148.25 with SMTP id m25mr28393608pfe.45.1490667766290; Mon, 27 Mar 2017 19:22:46 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.8.0 (2017-02-23)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 56
Organization linux.* mail to news gateway
X-Original-Cc Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, Minchan Kim <minchan@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, linux-kernel@vger.kernel.org, kernel-team@lge.com, Seth Jennings <sjenning@redhat.com>, Dan Streetman <ddstreet@ieee.org>
X-Original-Date Tue, 28 Mar 2017 11:22:45 +0900
X-Original-Message-ID <20170328022244.GB10573@jagdpanzerIV.localdomain>
X-Original-References <1489632398-31501-1-git-send-email-iamjoonsoo.kim@lge.com> <1489632398-31501-5-git-send-email-iamjoonsoo.kim@lge.com> <20170322000059.GB30149@bbox> <20170323030530.GC17486@js1304-P5Q-DELUXE> <20170327081105.GA390@jagdpanzerIV.localdomain> <20170328010217.GB8462@js1304-P5Q-DELUXE>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1610266

Show key headers only | View raw


Cc Seth and Dan, just in case


Hello Joonsoo,

On (03/28/17 10:02), Joonsoo Kim wrote:
[..]
> > so I was thinking for a moment -- do we want to keep this
> > functionality in zram or may be it belongs to allocator (zsmalloc)?
> > what do you think? just a question.
> 
> I think that zram is more appropriate layer to implement this feature.
> I may be wrong so please let me know if I'm missing something.
> 
> First, I'd like to leave allocator to just allocator. If it awares the
> contents, further improvement would be restricted. For example, we
> should use map/unmap semantic to store contents, since, without them,
> we can't know when the content is changed and when deduplication check
> should be done. I know that zsmalloc is already implemented by that
> way but I guess that similar issue could happen in the future.
> 
> Second, we always need to compress the page to check duplication
> if it is implemented in zsmalloc since we store compressed page to
> zsmalloc. I guess that less compression would be better in performance
> wise.
> 
> Third, in case of zsmalloc dedup, we always need to allocate zs memory
> before checking duplication and need to free it if duplication is
> found. It's also undesirable.
> 
> If you are okay with above arguments, I will send v2 soon.

thanks.
I'm OK with your arguments.


to explain my point a bit further (zsmalloc was a bad call,
I guess I meant zpool):

the reason I asked was that both zram and zswap sort of trying to
have same optimizations - zero filled pages handling, for example.
zram is a bit ahead now (to the best of my knowledge), because of
the recent 'same element' filled pages. zswap, probably, will have
something like this as well some day. or may be it won't, up to Seth
and Dan. de-duplication definitely can improve both zram and zswap,
which, once again, suggests that at some point zswap will have its
own implementation. well, or it won't.

so I though that may be we could have zero filled pages handling/same
element pages handling/de-duplication somewhere in the "middle" layer.
like zpool for instance (zram does not support zpool as of now) so we
could unify things.

just an idea. no pressure.

	-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] zram: make deduplication feature optional js1304@gmail.com - 2017-03-16 03:50 +0100
  Re: [PATCH 4/4] zram: make deduplication feature optional Minchan Kim <minchan@kernel.org> - 2017-03-22 01:10 +0100
    Re: [PATCH 4/4] zram: make deduplication feature optional Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2017-03-23 04:10 +0100
      Re: [PATCH 4/4] zram: make deduplication feature optional Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-27 10:20 +0200
        Re: [PATCH 4/4] zram: make deduplication feature optional Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2017-03-28 03:10 +0200
          Re: [PATCH 4/4] zram: make deduplication feature optional Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-28 04:40 +0200
            Re: [PATCH 4/4] zram: make deduplication feature optional Minchan Kim <minchan@kernel.org> - 2017-03-28 05:00 +0200
              Re: [PATCH 4/4] zram: make deduplication feature optional Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-28 07:20 +0200
                Re: [PATCH 4/4] zram: make deduplication feature optional Minchan Kim <minchan@kernel.org> - 2017-03-28 08:10 +0200

csiph-web