Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401903

Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure
Date 2016-05-17 03:30 +0200
Message-ID <rzBZG-6iF-75@gated-at.bofh.it> (permalink)
References <rwJ7j-2Gd-3@gated-at.bofh.it> <rwJ7k-2Gd-23@gated-at.bofh.it> <rzheB-1xy-117@gated-at.bofh.it> <rzBPX-6dy-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (05/17/16 10:14), Minchan Kim wrote:
[..]
> > can we also switch create_cache() to errnos? I just like a bit
> > better
> > 		return -ENOMEM;
> > 	else
> > 		return 0;
> > 
> > than
> > 
> > 		return 1;
> > 	else
> > 		return 0;
> > 
> 
> Hmm, of course, I can do it easily.
> But zs_create_pool returns NULL without error propagation from sub
> functions so I don't see any gain from returning errno from
> create_cache. I don't mean I hate it but just need a justificaion
> to persuade grumpy me.

:) not married to those errnos. can skip it.

> > > +static struct zspage *isolate_zspage(struct size_class *class, bool source)
> > >  {
> > > +	struct zspage *zspage;
> > > +	enum fullness_group fg[2] = {ZS_ALMOST_EMPTY, ZS_ALMOST_FULL};
> > > +	if (!source) {
> > > +		fg[0] = ZS_ALMOST_FULL;
> > > +		fg[1] = ZS_ALMOST_EMPTY;
> > > +	}
> > > +
> > > +	for (i = 0; i < 2; i++) {
> > 
> > sorry, why not "for (i = ZS_ALMOST_EMPTY; i <= ZS_ALMOST_FULL ..." ?
> 
> For source zspage, the policy is to find a fragment object from ZS_ALMOST_EMPTY.
> For target zspage, the policy is to find a fragment object from ZS_ALMOST_FULL.
> 
> Do I misunderstand your question?

ahhh... sorry, it's just me being silly. I got it now.

	-ss

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-16 05:20 +0200
  Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure Minchan Kim <minchan@kernel.org> - 2016-05-17 03:20 +0200
    Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-17 03:30 +0200

csiph-web