[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5htndqx74yv2lq2zr2odozrrbi5cz6zizn3vk4uosobn4ceoji@5zuknjmi26f6>
Date: Thu, 13 Feb 2025 09:57:48 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>, Kairui Song <ryncsn@...il.com>, Minchan Kim <minchan@...nel.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 10/18] zsmalloc: factor out pool locking helpers
On (25/02/12 16:18), Yosry Ahmed wrote:
> On Wed, Feb 12, 2025 at 03:27:08PM +0900, Sergey Senozhatsky wrote:
> > We currently have a mix of migrate_{read,write}_lock() helpers
> > that lock zspages, but it's zs_pool that actually has a ->migrate_lock
> > access to which is opene-coded. Factor out pool migrate locking
> > into helpers, zspage migration locking API will be renamed to
> > reduce confusion.
> >
> > It's worth mentioning that zsmalloc locks sync not only migration,
> > but also compaction.
> >
> > Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
>
> FWIW I don't see a lot of value in the helpers (renaming the lock is
> useful tho).
I want to hide the details, keep them in one place and at some
point *in the future* have the same "locking rules" as for zspage
lock. Also *possibly* throwing a couple of lockdep assertions.
So I'd prefer to abstract all of these.
Powered by blists - more mailing lists