[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621135938.outx6qezuholc3hy@cab-wsm-0029881>
Date: Wed, 21 Jun 2023 13:59:43 +0000
From: Alexey Romanov <AVRomanov@...rdevices.ru>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
CC: Minchan Kim <minchan@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel <kernel@...rdevices.ru>
Subject: Re: [PATCH v1 1/2] zsmalloc: add allocated objects counter for
subpage
On Wed, Jun 21, 2023 at 10:55:18PM +0900, Sergey Senozhatsky wrote:
> On (23/06/21 13:41), Alexey Romanov wrote:
> [..]
> > > +static bool zspage_empty(struct zspage *zspage)
> > > +{
> > > + return get_zspage_inuse(zspage) == 0;
> > > +}
> > > +
> > > /**
> > > * zs_lookup_class_index() - Returns index of the zsmalloc &size_class
> > > * that hold objects of the provided size.
> > > @@ -1787,6 +1792,10 @@ static void migrate_zspage(struct zs_pool *pool, struct size_class *class,
> > > obj_idx++;
> > > record_obj(handle, free_obj);
> > > obj_free(class->size, used_obj, NULL);
> > > +
> > > + /* Stop if there are no more objects to migrate */
> > > + if (zspage_empty(get_zspage(s_page)))
> > > + break;
> > > }
> >
> > Yes it seems my version is not as good as I thought. Looks bad for an
> > architecturally dependent PAGE_SIZE. [..]
>
> Well, we are looking for a solution that is both reasonable (perf wise)
> and is maintainable.
>
> > I can implement this option. I'll test this and send patch this week.
>
> Either that or, if Suggested-by: Alexey Romanov <AVRomanov@...rdevices.ru>
> is good enough for you, then I can send a series tonight or tomorrow (after
> some testing). I have two more patches on top of that one.
Yeah, Suggested-by is OK. Let's send a patch. Thank you.
--
Thank you,
Alexey
Powered by blists - more mailing lists