[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160517012712.GA497@swordfish>
Date: Tue, 17 May 2016 10:27:12 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH v5 08/12] zsmalloc: introduce zspage structure
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
Powered by blists - more mailing lists