From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yosry Ahmed <yosryahmed@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCHv2 0/6] zsmalloc: fine-grained fullness and new compaction algorithm
Date: Thu, 23 Feb 2023 15:53:30 -0800	[thread overview]
Message-ID: <Y/f8esHswgLtjkee@google.com> (raw)
In-Reply-To: <20230223030451.543162-1-senozhatsky@chromium.org>
On Thu, Feb 23, 2023 at 12:04:45PM +0900, Sergey Senozhatsky wrote:
> 	Hi,
> 
> Existing zsmalloc page fullness grouping leads to suboptimal page
> selection for both zs_malloc() and zs_compact(). This patchset
> reworks zsmalloc fullness grouping/classification.
> 
> Additinally it also implements new compaction algorithm that is
> expected to use CPU-cycles (as it potentially does fewer memcpy-s
> in zs_object_copy()).
> 
> TEST
> ====
> 
> It's very challenging to reliably test this series. I ended up
> developing my own synthetic test that has 100% reproducibility.
> The test generates significan fragmentation (for each size class)
> and then performs compaction for each class individually and tracks
> the number of memcpy() in zs_object_copy(), so that we can compare
> the amount work compaction does on per-class basis.
> 
> Total amount of work (zram mm_stat objs_moved)
> ----------------------------------------------
> 
> Old fullness grouping, old compaction algorithm:
> 323977 memcpy() in zs_object_copy().
> 
> Old fullness grouping, new compaction algorithm:
> 262944 memcpy() in zs_object_copy().
> 
> New fullness grouping, new compaction algorithm:
> 213978 memcpy() in zs_object_copy().
> 
> 
> Per-class compaction memcpy() comparison (T-test)
Just curiosity: What's the T-test?
> -------------------------------------------------
> 
> x Old fullness grouping, old compaction algorithm
> + Old fullness grouping, new compaction algorithm
> 
>     N           Min           Max        Median           Avg        Stddev
> x 140           349          3513          2461     2314.1214     806.03271
> + 140           289          2778          2006     1878.1714     641.02073
> Difference at 95.0% confidence
> 	-435.95 +/- 170.595
> 	-18.8387% +/- 7.37193%
> 	(Student's t, pooled s = 728.216)
> 
> 
> x Old fullness grouping, old compaction algorithm
> + New fullness grouping, new compaction algorithm
> 
>     N           Min           Max        Median           Avg        Stddev
> x 140           349          3513          2461     2314.1214     806.03271
> + 140           226          2279          1644     1528.4143     524.85268
> Difference at 95.0% confidence
> 	-785.707 +/- 159.331
> 	-33.9527% +/- 6.88516%
> 	(Student's t, pooled s = 680.132)
What's the different with result above? Did you just run two times and
shows they are consistent or this is new result based on different
testing?
Anyway, this is really nice improvement. The comment I had in thread
are just minors.
Thanks, Sergey!
next prev parent reply	other threads:[~2023-02-23 23:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  3:04 [PATCHv2 0/6] zsmalloc: fine-grained fullness and new compaction algorithm Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 1/6] zsmalloc: remove insert_zspage() ->inuse optimization Sergey Senozhatsky
2023-02-23 23:09   ` Minchan Kim
2023-02-26  4:40     ` Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 2/6] zsmalloc: remove stat and fullness enums Sergey Senozhatsky
2023-02-23 23:11   ` Minchan Kim
2023-02-23 23:32     ` Yosry Ahmed
2023-02-26  4:39     ` Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 3/6] zsmalloc: fine-grained inuse ratio based fullness grouping Sergey Senozhatsky
2023-02-23 23:27   ` Minchan Kim
2023-02-26  4:38     ` Sergey Senozhatsky
2023-02-28 22:53       ` Minchan Kim
2023-03-01  4:05         ` Sergey Senozhatsky
2023-03-02  0:13           ` Minchan Kim
2023-03-01  8:55         ` Sergey Senozhatsky
2023-03-02  0:28           ` Minchan Kim
2023-03-02  0:53             ` Sergey Senozhatsky
2023-03-03  0:20               ` Minchan Kim
2023-03-03  1:06                 ` Sergey Senozhatsky
2023-03-03  1:38                   ` Minchan Kim
2023-03-03  1:43                     ` Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 4/6] zsmalloc: rework compaction algorithm Sergey Senozhatsky
2023-02-23 23:46   ` Minchan Kim
2023-02-26  4:09     ` Sergey Senozhatsky
2023-02-28 23:14   ` Minchan Kim
2023-03-01  3:47     ` Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 5/6] zsmalloc: extend compaction statistics Sergey Senozhatsky
2023-02-23 23:51   ` Minchan Kim
2023-02-26  3:55     ` Sergey Senozhatsky
2023-02-28 22:20       ` Minchan Kim
2023-03-01  3:54         ` Sergey Senozhatsky
2023-03-01 23:48           ` Minchan Kim
2023-03-03  1:57             ` Sergey Senozhatsky
2023-02-23  3:04 ` [PATCHv2 6/6] zram: show zsmalloc objs_moved stat in mm_stat Sergey Senozhatsky
2023-02-23 23:53 ` Minchan Kim [this message]
2023-02-26  3:50   ` [PATCHv2 0/6] zsmalloc: fine-grained fullness and new compaction algorithm Sergey Senozhatsky
2023-02-28 22:17     ` Minchan Kim
2023-03-01  3:57       ` Sergey Senozhatsky
2023-03-01 23:48         ` Minchan Kim
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=Y/f8esHswgLtjkee@google.com \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=senozhatsky@chromium.org \
    --cc=yosryahmed@google.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;
as well as URLs for NNTP newsgroup(s).