[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240628022500.GF15925@google.com>
Date: Fri, 28 Jun 2024 11:25:00 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Chengming Zhou <chengming.zhou@...ux.dev>
Cc: minchan@...nel.org, senozhatsky@...omium.org, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/zsmalloc: move record_obj() into obj_malloc()
On (24/06/27 15:59), Chengming Zhou wrote:
> We always record_obj() to make handle points to object after obj_malloc(),
> so simplify the code by moving record_obj() into obj_malloc(). There
> should be no functional change.
>
> Signed-off-by: Chengming Zhou <chengming.zhou@...ux.dev>
I guess I don't have a strong opinion on that.
FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
[..]
> @@ -1591,7 +1589,6 @@ static void migrate_zspage(struct zs_pool *pool, struct zspage *src_zspage,
> free_obj = obj_malloc(pool, dst_zspage, handle);
> zs_object_copy(class, free_obj, used_obj);
> obj_idx++;
> - record_obj(handle, free_obj);
> obj_free(class->size, used_obj);
I sort of like how here we would copy the object first and then record it,
some sort of "commit" stage. But I don't see any issues with the new code.
Powered by blists - more mailing lists