[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230619143506.45253-1-avromanov@sberdevices.ru>
Date: Mon, 19 Jun 2023 17:35:04 +0300
From: Alexey Romanov <avromanov@...rdevices.ru>
To: <minchan@...nel.org>, <senozhatsky@...omium.org>,
<akpm@...ux-foundation.org>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<kernel@...rdevices.ru>, Alexey Romanov <avromanov@...rdevices.ru>
Subject: [PATCH v1 0/2] Add obj allocated counter for subpages
This patch series adds a count of allocated objects for each of the
zspage subpages. The main idea is that we can use the extra bytes
of the page_type field, because with PAGE_SIZE = 4096 we only use
the first two bytes there.
By storing the number of allocated objects, we can optimize, for
example, the running time of function find_allocated_obj, as well
as the entire compact algorithm as a whole. Also, counting allocated
objects has no effect on the performance of the entire zsmalloc:
bitwise operations are fast and we don't use any extra memory.
I also believe that we can also use this counter (maybe in the future)
in some other things, which will speed up the allocator even more.
Alexey Romanov (2):
zsmalloc: add allocated objects counter for subpage
zsmalloc: check empty page in find_alloced_obj
mm/zsmalloc.c | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)
--
2.38.1
Powered by blists - more mailing lists