From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbbCIAFU (ORCPT ); Sun, 8 Mar 2015 20:05:20 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:43630 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbbCIAFR (ORCPT ); Sun, 8 Mar 2015 20:05:17 -0400 Date: Mon, 9 Mar 2015 09:05:06 +0900 From: Minchan Kim To: Heesub Shin Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Juneho Choi , Gunho Lee , Luigi Semenzato , Dan Streetman , Seth Jennings , Nitin Gupta , Jerome Marchand , Sergey Senozhatsky , Joonsoo Kim , opensource.ganesh@gmail.com Subject: Re: [PATCH v2 3/7] zsmalloc: support compaction Message-ID: <20150309000506.GA15184@blaptop> References: <1425445292-29061-1-git-send-email-minchan@kernel.org> <1425445292-29061-4-git-send-email-minchan@kernel.org> <54F7E719.6070505@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54F7E719.6070505@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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