From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754130AbdBNQRo (ORCPT ); Tue, 14 Feb 2017 11:17:44 -0500 Received: from mail-ot0-f196.google.com ([74.125.82.196]:33878 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752826AbdBNQRg (ORCPT ); Tue, 14 Feb 2017 11:17:36 -0500 Date: Wed, 15 Feb 2017 01:16:53 +0900 From: Sergey Senozhatsky To: Yisheng Xie Cc: akpm@linux-foundation.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, guohanjun@huawei.com Subject: Re: [RFC] mm/zsmalloc: remove redundant SetPagePrivate2 in create_page_chain Message-ID: <20170214161653.GA10321@tigerII.localdomain> References: <1487076509-49270-1-git-send-email-xieyisheng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487076509-49270-1-git-send-email-xieyisheng1@huawei.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/14/17 20:48), Yisheng Xie wrote: > We had used page->lru to link the component pages (except the first > page) of a zspage, and used INIT_LIST_HEAD(&page->lru) to init it. > Therefore, to get the last page's next page, which is NULL, we had to > use page flag PG_Private_2 to identify it. > > But now, we use page->freelist to link all of the pages in zspage and > init the page->freelist as NULL for last page, so no need to use > PG_Private_2 anymore. > > This patch is to remove redundant SetPagePrivate2 in create_page_chain > and ClearPagePrivate2 in reset_page(). Maybe can save few cycles for > migration of zsmalloc page :) > > Signed-off-by: Yisheng Xie looks good to me. Reviewed-by: Sergey Senozhatsky -ss