diff options
| author | Sergey Senozhatsky <senozhatsky@chromium.org> | 2023-06-24 08:12:14 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 20:12:07 +0300 |
| commit | df9cd3cbf209b9357f2939ba63afa427026e954b (patch) | |
| tree | 6edccf70a8136ce43aefe5d6a60a935d3e46d067 /include | |
| parent | 3fade62b62e84dd8dbf6e92d494b0e7eca750c43 (diff) | |
| download | linux-df9cd3cbf209b9357f2939ba63afa427026e954b.tar.xz | |
zsmalloc: do not scan for allocated objects in empty zspage
Patch series "zsmalloc: small compaction improvements", v2.
A tiny series that can reduce the number of find_alloced_obj() invocations
(which perform a linear scan of sub-page) during compaction. Inspired by
Alexey Romanov's findings.
This patch (of 3):
zspage migration can terminate as soon as it moves the last allocated
object from the source zspage. Add a simple helper zspage_empty() that
tests zspage ->inuse on each migration iteration.
Link: https://lkml.kernel.org/r/20230624053120.643409-2-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Suggested-by: Alexey Romanov <AVRomanov@sberdevices.ru>
Reviewed-by: Alexey Romanov <avromanov@sberdevices.ru>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
