linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jerome Marchand <jmarchan@redhat.com>,
	Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Seth Jennings <sjennings@variantweb.net>,
	Ganesh Mahendran <opensource.ganesh@gmail.com>,
	Luigi Semenzato <semenzato@google.com>,
	Gunho Lee <gunho.lee@lge.com>, Juneho Choi <juno.choi@lge.com>,
	Heesub Shin <heesub.shin@samsung.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zsmalloc: remove unnecessary insertion/removal of zspage in compaction
Date: Wed, 25 Mar 2015 23:58:38 +0900	[thread overview]
Message-ID: <20150325145838.GC3814@blaptop> (raw)
In-Reply-To: <1425859840-29652-1-git-send-email-minchan@kernel.org>

I was missing mailing lists.
Ping again with correction.

On Mon, Mar 09, 2015 at 09:10:40AM +0900, Minchan Kim wrote:
> In putback_zspage, we don't need to insert a zspage into list of zspage
> in size_class again to just fix fullness group. We could do directly
> without reinsertion so we could save some instuctions.
> 
> Reported-by: Heesub Shin <heesub.shin@samsung.com>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
>  mm/zsmalloc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 71e4ef496918..e73a78cd340a 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1707,14 +1707,14 @@ static struct page *alloc_target_page(struct size_class *class)
>  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);
> +	fullness = get_fullness_group(first_page);
>  	insert_zspage(first_page, class, fullness);
> -	fullness = fix_fullness_group(class, first_page);
> +	set_zspage_mapping(first_page, class->index, fullness);
> +
>  	if (fullness == ZS_EMPTY) {
>  		zs_stat_dec(class, OBJ_ALLOCATED, get_maxobj_per_zspage(
>  			class->size, class->pages_per_zspage));
> -- 
> 1.9.1
> 

-- 
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>

           reply	other threads:[~2015-03-25 14:58 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1425859840-29652-1-git-send-email-minchan@kernel.org>]

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=20150325145838.GC3814@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox