From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Chengming Zhou <chengming.zhou@linux.dev>
Cc: minchan@kernel.org, senozhatsky@chromium.org,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/zsmalloc: move record_obj() into obj_malloc()
Date: Fri, 28 Jun 2024 11:25:00 +0900 [thread overview]
Message-ID: <20240628022500.GF15925@google.com> (raw)
In-Reply-To: <20240627075959.611783-2-chengming.zhou@linux.dev>
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@linux.dev>
I guess I don't have a strong opinion on that.
FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.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.
next prev parent reply other threads:[~2024-06-28 2:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 7:59 [PATCH 1/2] mm/zsmalloc: fix class per-fullness zspage counts Chengming Zhou
2024-06-27 7:59 ` [PATCH 2/2] mm/zsmalloc: move record_obj() into obj_malloc() Chengming Zhou
2024-06-28 2:25 ` Sergey Senozhatsky [this message]
2024-06-27 20:33 ` [PATCH 1/2] mm/zsmalloc: fix class per-fullness zspage counts Andrew Morton
2024-06-28 0:51 ` Sergey Senozhatsky
2024-06-28 0:55 ` Sergey Senozhatsky
2024-06-28 1:08 ` Sergey Senozhatsky
2024-06-28 3:19 ` Chengming Zhou
2024-07-01 1:37 ` Sergey Senozhatsky
2024-07-01 2:20 ` Chengming Zhou
2024-07-01 2:49 ` Chengming Zhou
2024-07-01 3:13 ` Sergey Senozhatsky
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=20240628022500.GF15925@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
/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