From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by kanga.kvack.org (Postfix) with ESMTP id DFA5C828DF for ; Tue, 15 Mar 2016 02:27:02 -0400 (EDT) Received: by mail-pf0-f174.google.com with SMTP id x3so14937720pfb.1 for ; Mon, 14 Mar 2016 23:27:02 -0700 (PDT) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com. [2607:f8b0:400e:c00::235]) by mx.google.com with ESMTPS id 13si1347981pft.59.2016.03.14.23.27.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Mar 2016 23:27:02 -0700 (PDT) Received: by mail-pf0-x235.google.com with SMTP id n5so14884849pfn.2 for ; Mon, 14 Mar 2016 23:27:02 -0700 (PDT) Date: Tue, 15 Mar 2016 15:28:24 +0900 From: Sergey Senozhatsky Subject: Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class Message-ID: <20160315062824.GE1464@swordfish> References: <1457681423-26664-1-git-send-email-minchan@kernel.org> <1457681423-26664-10-git-send-email-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457681423-26664-10-git-send-email-minchan@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, jlayton@poochiereds.net, bfields@fieldses.org, Vlastimil Babka , Joonsoo Kim , koct9i@gmail.com, aquini@redhat.com, virtualization@lists.linux-foundation.org, Mel Gorman , Hugh Dickins , Sergey Senozhatsky , rknize@motorola.com, Rik van Riel , Gioh Kim On (03/11/16 16:30), Minchan Kim wrote: > Every zspage in a size_class has same number of max objects so > we could move it to a size_class. > > Signed-off-by: Minchan Kim > --- > mm/zsmalloc.c | 29 ++++++++++++++--------------- > 1 file changed, 14 insertions(+), 15 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index b4fb11831acb..ca663c82c1fc 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -32,8 +32,6 @@ > * page->freelist: points to the first free object in zspage. > * Free objects are linked together using in-place > * metadata. > - * page->objects: maximum number of objects we can store in this > - * zspage (class->zspage_order * PAGE_SIZE / class->size) > * page->lru: links together first pages of various zspages. > * Basically forming list of zspages in a fullness group. > * page->mapping: class index and fullness group of the zspage > @@ -211,6 +209,7 @@ struct size_class { > * of ZS_ALIGN. > */ > int size; > + int objs_per_zspage; > unsigned int index; struct page ->objects "comes for free". now we don't use it, instead every size_class grows by 4 bytes? is there any reason for this? -ss -- 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: email@kvack.org