[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621135518.GD2934656@google.com>
Date: Wed, 21 Jun 2023 22:55:18 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Alexey Romanov <AVRomanov@...rdevices.ru>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
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 (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.
Powered by blists - more mailing lists