zsmalloc: fine-grained fullness and new compaction algorithm
From: | Sergey Senozhatsky <senozhatsky-AT-chromium.org> | |
To: | Minchan Kim <minchan-AT-kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org> | |
Subject: | [PATCHv3 0/4] zsmalloc: fine-grained fullness and new compaction algorithm | |
Date: | Fri, 03 Mar 2023 16:31:26 +0900 | |
Message-ID: | <20230303073130.1950714-1-senozhatsky@chromium.org> | |
Cc: | Yosry Ahmed <yosryahmed-AT-google.com>, linux-kernel-AT-vger.kernel.org, linux-mm-AT-kvack.org, Sergey Senozhatsky <senozhatsky-AT-chromium.org> | |
Archive-link: | Article |
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 less CPU-cycles (as it potentially does fewer memcpy-s in zs_object_copy()). Test (synthetic) results can be seen in patch 0003. v3: -- reworked compaction algorithm implementation (Minchan) -- keep existing stats and fullness enums (Minchan, Yosry) -- dropped the patch with new zsmalloc compaction stats (Minchan) -- report per inuse ratio group classes stats Sergey Senozhatsky (4): zsmalloc: remove insert_zspage() ->inuse optimization zsmalloc: fine-grained inuse ratio based fullness grouping zsmalloc: rework compaction algorithm zsmalloc: show per fullness group class stats mm/zsmalloc.c | 362 ++++++++++++++++++++++++-------------------------- 1 file changed, 175 insertions(+), 187 deletions(-) -- 2.40.0.rc0.216.gc4246ad0f0-goog