All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 2/2] zram: user per-cpu compression streams
Date: Mon, 2 May 2016 16:25:08 +0900	[thread overview]
Message-ID: <20160502072508.GA1811@swordfish> (raw)
In-Reply-To: <20160502062311.GB6077@bbox>

Hello Minchan,

On (05/02/16 15:23), Minchan Kim wrote:
[..]
> Thanks for the your great test.
> Today, I tried making heavy memory pressure to make dobule compression
> but it was not easy so I guess it's really hard to get in real practice
> I hope it doesn't make any regression. ;-)

:) it is quite 'hard', indeed. huge 're-compression' numbers usually
come together with OOM-kill and OOM-panic. per my 'testing experience'.

I'm thinking about making that test a 'general zram' test and post
it somewhere on github/etc., so we it'll be easier to measure and
compare things.

> >  bool zcomp_set_max_streams(struct zcomp *comp, int num_strm)
> >  {
> > -	return comp->set_max_streams(comp, num_strm);
> > +	return true;
> >  }
> 
> I like this part. We don't need to remove set_max_stream interface
> right now. Because percpu might make regression if double comp raio
> is high. If so, we should roll back so let's wait for two year and
> if anyting is not wrong, then we could deprecate multi stream
> interfaces. I hope you are on same page.

sure. I did this intentionally, because I really don't want to create a
mess of attrs that are about to retire. we have N attrs that will disappear
or see a downcast (and we warn users in kernel log) next summer (4.10 or
4.11, IIRC). if we add max_comp_stream to the list now then we either should
abandon our regular "2 years of retirement warn" rule and drop max_comp_stream
only after 1 year (because it has 1 year of overlap with already scheduled
for removal attrs) or complicate things for zram users: attrs will be dropped
in different kernel releases and users are advised to keep that in mind. I
think it's fine to have it as a NOOP attr as of now and deprecate it during
the next 'attr cleanup' 2 years cycle. yes, we are on the same page ;)

> > @@ -356,10 +226,7 @@ struct zcomp *zcomp_create(const char *compress, int max_strm)
> 
> Trivial:
> We could remove max_strm now and change description.

oh, yes.

> > +		zcomp_strm_release(zram->comp, zstrm);
> > +		zstrm = NULL;
> > +
> > +		handle = zs_malloc(meta->mem_pool, clen,
> > +				GFP_NOIO | __GFP_HIGHMEM);
> > +		if (handle)
> > +			goto compress_again;
> 
> We can avoid page_zero_filled in second trial but not sure it is worth
> to do because in my experiment, not easy to make double compression.
> If I did, the ratio is really small compared total_write so it doesn't
> need to add new branch to detect it in normal path.
>
> Acutally, I asked adding dobule compression stat to you. It seems you
> forgot but okay. Because I want to change stat code and contents so
> I will send a patch after I send rework about stat. :)

aha... I misunderstood you. I thought you talked about the test results
in particular, not about zram stats in general. hm, given that we don't
close the door for 'idle compression streams list' yet, and may revert
per-cpu streams, may be we can introduce this stat in 4.8? otherwise, in
the worst case, we will have to trim a user visible stat file once again
IF we, for some reason, will decide to return idle list back (hopefully
we will not). does it sound OK to you to not touch the stat file now?

> Thanks for the great work, Sergey!

thanks!

> Acked-by: Minchan Kim <minchan@kernel.org>

thanks!

	-ss

  reply	other threads:[~2016-05-02  7:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 16:17 [PATCH 0/2] zram: switch to per-cpu compression streams Sergey Senozhatsky
2016-04-28 16:17 ` [PATCH 1/2] zsmalloc: require GFP in zs_malloc() Sergey Senozhatsky
2016-04-29  5:44   ` Minchan Kim
2016-04-29  7:30     ` Sergey Senozhatsky
2016-04-28 16:17 ` [PATCH 2/2] zram: user per-cpu compression streams Sergey Senozhatsky
2016-05-02  6:23   ` Minchan Kim
2016-05-02  7:25     ` Sergey Senozhatsky [this message]
2016-05-02  8:06       ` Sergey Senozhatsky
2016-05-03  5:23         ` Minchan Kim
2016-05-03  5:40           ` Minchan Kim
2016-05-03  5:57             ` Sergey Senozhatsky
2016-05-03  6:19               ` Minchan Kim
2016-05-03  7:01                 ` Sergey Senozhatsky
2016-05-03  5:44           ` Sergey Senozhatsky
2016-05-02  8:28       ` Minchan Kim
2016-05-02  9:21         ` Sergey Senozhatsky
2016-05-03  1:40           ` Minchan Kim
2016-05-03  1:53             ` Sergey Senozhatsky
2016-05-03  2:20               ` Minchan Kim
2016-05-03  2:30                 ` Sergey Senozhatsky
2016-05-03  4:29                   ` Sergey Senozhatsky
2016-05-03  5:03                     ` Minchan Kim
2016-05-03  6:53                       ` Sergey Senozhatsky

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=20160502072508.GA1811@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.