[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <k3sjohhgao4zlu7nqjrwrbajctz65dtzg2aip42vjygpaiyg7r@hjwsb54qbjm2>
Date: Tue, 25 Feb 2025 13:29:49 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>, Yosry Ahmed <yosry.ahmed@...ux.dev>,
Hillf Danton <hdanton@...a.com>, Kairui Song <ryncsn@...il.com>, Minchan Kim <minchan@...nel.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 12/17] zsmalloc: introduce new object mapping API
On (25/02/24 10:01), Sebastian Andrzej Siewior wrote:
> Date: Mon, 24 Feb 2025 10:01:54 +0100
> From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> To: Sergey Senozhatsky <senozhatsky@...omium.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>, Yosry Ahmed
> <yosry.ahmed@...ux.dev>, Hillf Danton <hdanton@...a.com>, Kairui Song
> <ryncsn@...il.com>, Minchan Kim <minchan@...nel.org>, linux-mm@...ck.org,
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v8 12/17] zsmalloc: introduce new object mapping API
> Message-ID: <20250224090154.7Xlsipmu@...utronix.de>
>
> On 2025-02-22 07:25:43 [+0900], Sergey Senozhatsky wrote:
> > index 03710d71d022..1288a4120855 100644
> > --- a/mm/zsmalloc.c
> > +++ b/mm/zsmalloc.c
> > @@ -1377,6 +1377,135 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle)
> > }
> > EXPORT_SYMBOL_GPL(zs_unmap_object);
> >
> > +void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
> > + void *local_copy)
> > +{
> > + struct zspage *zspage;
> > + struct zpdesc *zpdesc;
> > + unsigned long obj, off;
> > + unsigned int obj_idx;
> > + struct size_class *class;
> > + void *addr;
> > +
> > + WARN_ON(in_interrupt());
>
> This macro is deprecated. Could you come up with something else like
> !in_task() if needed?
This was derived from the current zsmalloc object mapping API
BUG_ON(in_interrupt());
but converted from BUG_ON() to WARN_ON(). I guess I can drop
entirely tho.
Powered by blists - more mailing lists