[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2022 09:14:45 -0800
From: Minchan Kim <minchan@...nel.org>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCHv4 6/9] zsmalloc: pass limit on pages per-zspage to
zs_create_pool()
On Wed, Nov 09, 2022 at 03:24:43PM +0900, Sergey Senozhatsky wrote:
> On (22/10/31 14:41), Sergey Senozhatsky wrote:
> [..]
> > -struct zs_pool *zs_create_pool(const char *name)
> > +struct zs_pool *zs_create_pool(const char *name, unsigned long num_pages)
> > {
> > int i;
> > struct zs_pool *pool;
> > struct size_class *prev_class = NULL;
> > - unsigned long num_pages;
> > +
> > + if (WARN_ON(num_pages < ZS_MIN_PAGES_PER_ZSPAGE ||
> > + num_pages > ZS_MAX_PAGES_PER_ZSPAGE))
> > + return NULL;
>
> I tend to think that creating `struct zs_tunables` would be better. For
> the time being zs_tunables will contain only one member max_zspage_len,
> but it can be extended in the future.
+1 zs_tunables if we go that way.
Powered by blists - more mailing lists