All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Chengming Zhou <chengming.zhou@linux.dev>
Cc: hannes@cmpxchg.org, Sergey Senozhatsky <senozhatsky@chromium.org>,
	Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	nphamcs@gmail.com, yosryahmed@google.com, linux-mm@kvack.org,
	Chengming Zhou <zhouchengming@bytedance.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 2/3] mm/zsmalloc: remove migrate_write_lock_nested()
Date: Fri, 23 Feb 2024 14:56:26 +0900	[thread overview]
Message-ID: <20240223055626.GV11472@google.com> (raw)
In-Reply-To: <20240219-b4-szmalloc-migrate-v1-2-fc21039bed7b@linux.dev>

On (24/02/20 11:36), Chengming Zhou wrote:
> From: Chengming Zhou <zhouchengming@bytedance.com>
> 
> The migrate write lock is to protect the race between zspage migration
> and zspage objects' map users.
> 
> We only need to lock out the map users of src zspage, not dst zspage,
> which is safe to map by users concurrently, since we only need to do
> obj_malloc() from dst zspage.
> 
> So we can remove the migrate_write_lock_nested() use case.
> 
> As we are here, cleanup the __zs_compact() by moving putback_zspage()
> outside of migrate_write_unlock since we hold pool lock, no malloc or
> free users can come in.
> 
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>


  reply	other threads:[~2024-02-23  5:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 11:36 [PATCH RESEND 0/3] mm/zsmalloc: fix and optimize objects/page migration Chengming Zhou
2024-02-20 11:36 ` [PATCH RESEND 1/3] mm/zsmalloc: fix migrate_write_lock() when !CONFIG_COMPACTION Chengming Zhou
2024-02-23  5:49   ` Sergey Senozhatsky
2024-02-20 11:36 ` [PATCH RESEND 2/3] mm/zsmalloc: remove migrate_write_lock_nested() Chengming Zhou
2024-02-23  5:56   ` Sergey Senozhatsky [this message]
2024-02-20 11:37 ` [PATCH RESEND 3/3] mm/zsmalloc: remove unused zspage->isolated Chengming Zhou
2024-02-23  5:50   ` 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=20240223055626.GV11472@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=nphamcs@gmail.com \
    --cc=yosryahmed@google.com \
    --cc=zhouchengming@bytedance.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.