linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Romanov <AVRomanov@sberdevices.ru>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel <kernel@sberdevices.ru>
Subject: Re: [PATCH v1 1/2] zsmalloc: add allocated objects counter for subpage
Date: Wed, 21 Jun 2023 13:59:43 +0000	[thread overview]
Message-ID: <20230621135938.outx6qezuholc3hy@cab-wsm-0029881> (raw)
In-Reply-To: <20230621135518.GD2934656@google.com>

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@sberdevices.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

  reply	other threads:[~2023-06-21 13:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19 14:35 [PATCH v1 0/2] Add obj allocated counter for subpages Alexey Romanov
2023-06-19 14:35 ` [PATCH v1 1/2] zsmalloc: add allocated objects counter for subpage Alexey Romanov
2023-06-20 10:36   ` Sergey Senozhatsky
2023-06-20 11:16     ` Alexey Romanov
2023-06-21 13:17       ` Sergey Senozhatsky
2023-06-21 13:41         ` Alexey Romanov
2023-06-21 13:55           ` Sergey Senozhatsky
2023-06-21 13:59             ` Alexey Romanov [this message]
2023-06-21 14:18               ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230621135938.outx6qezuholc3hy@cab-wsm-0029881 \
    --to=avromanov@sberdevices.ru \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@sberdevices.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox