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


Groups > linux.kernel > #1631084 > unrolled thread

[PATCH v4 0/4] zram: implement deduplication in zram

Started byjs1304@gmail.com
First post2017-04-26 03:00 +0200
Last post2017-04-27 10:00 +0200
Articles 2 on this page of 22 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/4] zram: implement deduplication in zram js1304@gmail.com - 2017-04-26 03:00 +0200
    [PATCH v4 2/4] zram: implement deduplication in zram js1304@gmail.com - 2017-04-26 03:00 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 04:20 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:00 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Minchan Kim <minchan@kernel.org> - 2017-04-26 08:30 +0200
            Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 09:10 +0200
              Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 09:30 +0200
                Re: [PATCH v4 2/4] zram: implement deduplication in zram Minchan Kim <minchan@kernel.org> - 2017-04-26 09:50 +0200
            Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 09:20 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 04:40 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:10 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 06:10 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:30 +0200
            Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-27 09:00 +0200
              Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-27 09:50 +0200
                Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-05-02 07:40 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 06:30 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:20 +0200
    Re: [PATCH v4 0/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-27 10:00 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1631171 — Re: [PATCH v4 2/4] zram: implement deduplication in zram

FromSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Date2017-04-26 08:20 +0200
SubjectRe: [PATCH v4 2/4] zram: implement deduplication in zram
Message-ID<tAosV-6T6-3@gated-at.bofh.it>
In reply to#1631170
On (04/26/17 15:08), Joonsoo Kim wrote:
> > > +struct zram_hash {
> > > +	spinlock_t lock;
> > > +	struct rb_root rb_root;
> > >  };
> > 
> > just a note.
> > 
> > we can easily have N CPUs spinning on ->lock for __zram_dedup_get() lookup,
> > which can invole a potentially slow zcomp_decompress() [zlib, for example,
> > with 64k pages] and memcmp(). the larger PAGE_SHIFT is, the more serialized
> > IOs become. in theory, at least.
> > 
> > CPU0				CPU1		...	CPUN
> > 
> > __zram_bvec_write()	__zram_bvec_write()		__zram_bvec_write()
> >  zram_dedup_find()	 zram_dedup_find()		 zram_dedup_find()
> >   spin_lock(&hash->lock);
> > 			  spin_lock(&hash->lock);	  spin_lock(&hash->lock);
> >    __zram_dedup_get()
> >     zcomp_decompress()
> >      ...
> > 
> > 
> > so may be there is a way to use read-write lock instead on spinlock for hash
> > and reduce write/read IO serialization.
> 
> In fact, dedup release hash->lock before doing zcomp_decompress(). So,
> above contention cannot happen.

oh, my bad. you are right. somehow I didn't spot the unlock.

	-ss

[toc] | [prev] | [next] | [standalone]


#1631938

FromSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Date2017-04-27 10:00 +0200
Message-ID<tAMvf-5Tv-9@gated-at.bofh.it>
In reply to#1631084
On (04/26/17 09:52), js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> 
> Changes from v3
> o fix module build problem
> o make zram_dedup_enabled() statically return false if CONFIG_ZRAM_DEDUP=n

the entire patch set

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web