All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Heesub Shin <heesub.shin@samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Juneho Choi <juno.choi@lge.com>, Gunho Lee <gunho.lee@lge.com>,
	Luigi Semenzato <semenzato@google.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Seth Jennings <sjennings@variantweb.net>,
	Nitin Gupta <ngupta@vflare.org>,
	Jerome Marchand <jmarchan@redhat.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	opensource.ganesh@gmail.com
Subject: Re: [PATCH v2 3/7] zsmalloc: support compaction
Date: Mon, 9 Mar 2015 09:05:06 +0900	[thread overview]
Message-ID: <20150309000506.GA15184@blaptop> (raw)
In-Reply-To: <54F7E719.6070505@samsung.com>

Hello Heesub,

On Thu, Mar 05, 2015 at 02:18:17PM +0900, Heesub Shin wrote:
> Hello Minchan,
> 
> Nice work!

Thanks. :)

> 
> On 03/04/2015 02:01 PM, Minchan Kim wrote:
> > +static void putback_zspage(struct zs_pool *pool, struct size_class *class,
> > +				struct page *first_page)
> > +{
> > +	int class_idx;
> > +	enum fullness_group fullness;
> > +
> > +	BUG_ON(!is_first_page(first_page));
> > +
> > +	get_zspage_mapping(first_page, &class_idx, &fullness);
> > +	insert_zspage(first_page, class, fullness);
> > +	fullness = fix_fullness_group(class, first_page);
> 
> Removal and re-insertion of zspage above can be eliminated, like this:
> 
> 	fullness = get_fullness_group(first_page);
> 	insert_zspage(first_page, class, fullness);
> 	set_zspage_mapping(first_page, class->index, fullness);

True.

Thanks for the review!

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Heesub Shin <heesub.shin@samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Juneho Choi <juno.choi@lge.com>, Gunho Lee <gunho.lee@lge.com>,
	Luigi Semenzato <semenzato@google.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Seth Jennings <sjennings@variantweb.net>,
	Nitin Gupta <ngupta@vflare.org>,
	Jerome Marchand <jmarchan@redhat.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	opensource.ganesh@gmail.com
Subject: Re: [PATCH v2 3/7] zsmalloc: support compaction
Date: Mon, 9 Mar 2015 09:05:06 +0900	[thread overview]
Message-ID: <20150309000506.GA15184@blaptop> (raw)
In-Reply-To: <54F7E719.6070505@samsung.com>

Hello Heesub,

On Thu, Mar 05, 2015 at 02:18:17PM +0900, Heesub Shin wrote:
> Hello Minchan,
> 
> Nice work!

Thanks. :)

> 
> On 03/04/2015 02:01 PM, Minchan Kim wrote:
> > +static void putback_zspage(struct zs_pool *pool, struct size_class *class,
> > +				struct page *first_page)
> > +{
> > +	int class_idx;
> > +	enum fullness_group fullness;
> > +
> > +	BUG_ON(!is_first_page(first_page));
> > +
> > +	get_zspage_mapping(first_page, &class_idx, &fullness);
> > +	insert_zspage(first_page, class, fullness);
> > +	fullness = fix_fullness_group(class, first_page);
> 
> Removal and re-insertion of zspage above can be eliminated, like this:
> 
> 	fullness = get_fullness_group(first_page);
> 	insert_zspage(first_page, class, fullness);
> 	set_zspage_mapping(first_page, class->index, fullness);

True.

Thanks for the review!

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2015-03-09  0:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  5:01 [PATCH v2 0/7] zsmalloc: compaction support Minchan Kim
2015-03-04  5:01 ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 1/7] zsmalloc: decouple handle and object Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04  5:07   ` Minchan Kim
2015-03-04  5:07     ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 2/7] zsmalloc: factor out obj_[malloc|free] Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 3/7] zsmalloc: support compaction Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-05  5:18   ` Heesub Shin
2015-03-05  5:18     ` Heesub Shin
2015-03-09  0:05     ` Minchan Kim [this message]
2015-03-09  0:05       ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 4/7] zsmalloc: adjust ZS_ALMOST_FULL Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 5/7] zram: support compaction Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 6/7] zsmalloc: record handle in page->private for huge object Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04  5:01 ` [PATCH v2 7/7] zsmalloc: add fullness into stat Minchan Kim
2015-03-04  5:01   ` Minchan Kim
2015-03-04 22:02   ` Andrew Morton
2015-03-04 22:02     ` Andrew Morton
2015-03-05  0:43     ` Minchan Kim
2015-03-05  0:43       ` Minchan Kim
2015-03-05  0:56       ` Andrew Morton
2015-03-05  0:56         ` Andrew Morton
2015-03-04  5:09 ` [PATCH v2 0/7] zsmalloc: compaction support Minchan Kim
2015-03-04  5:09   ` Minchan Kim

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=20150309000506.GA15184@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=gunho.lee@lge.com \
    --cc=heesub.shin@samsung.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jmarchan@redhat.com \
    --cc=juno.choi@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=opensource.ganesh@gmail.com \
    --cc=semenzato@google.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sjennings@variantweb.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.