[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240220050234.GF11472@google.com>
Date: Tue, 20 Feb 2024 14:02:34 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, nphamcs@...il.com,
yosryahmed@...gle.com, Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, hannes@...xchg.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mm/zsmalloc: remove migrate_write_lock_nested()
On (24/02/20 12:59), Chengming Zhou wrote:
> On 2024/2/20 12:53, Sergey Senozhatsky wrote:
> > On (24/02/20 12:51), Chengming Zhou wrote:
> >> On 2024/2/20 12:48, Sergey Senozhatsky wrote:
> >>> On (24/02/19 13:33), Chengming Zhou wrote:
> >>> [..]
> >
> > Not really. We have, for example, the following patterns:
> >
> > get_zspage_mapping()
> > spin_lock(&pool->lock)
>
> Right, this pattern is not safe actually, since we can't get stable fullness
> value of zspage outside pool->lock.
>
> But this pattern usage is only used in free_zspage path, so should be ok.
> Actually we don't use the fullness value returned from get_zspage_mapping()
> in the free_zspage() path, only use the class value to get the class.
>
> Anyway, this pattern is confusing, I think we should clean up that?
Right, looks so.
Powered by blists - more mailing lists