From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932563AbbIXDsg (ORCPT ); Wed, 23 Sep 2015 23:48:36 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34295 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932287AbbIXDsd (ORCPT ); Wed, 23 Sep 2015 23:48:33 -0400 Date: Thu, 24 Sep 2015 12:49:19 +0900 From: Sergey Senozhatsky To: akpm@linux-foundation.org Cc: zhuhui@xiaomi.com, ddstreet@ieee.org, minchan@kernel.org, sergey.senozhatsky@gmail.com, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: + zsmalloc-add-comments-for-inuse-to-zspage.patch added to -mm tree Message-ID: <20150924034919.GA626@swordfish> References: <56031f46.Sso3v1Nk/xNfu2xv%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56031f46.Sso3v1Nk/xNfu2xv%akpm@linux-foundation.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/23/15 14:53), akpm@linux-foundation.org wrote: > ------------------------------------------------------ > From: Hui Zhu > Subject: zsmalloc: add comments for ->inuse to zspage > > Signed-off-by: Hui Zhu > Cc: Sergey Senozhatsky > Cc: Dan Streetman > Cc: Minchan Kim > Signed-off-by: Andrew Morton > --- > > mm/zsmalloc.c | 1 + > 1 file changed, 1 insertion(+) > > diff -puN mm/zsmalloc.c~zsmalloc-add-comments-for-inuse-to-zspage mm/zsmalloc.c > --- a/mm/zsmalloc.c~zsmalloc-add-comments-for-inuse-to-zspage > +++ a/mm/zsmalloc.c > @@ -38,6 +38,7 @@ > * 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 > + * page->inuse: the pages number that is used in this zspage Probably arrived last night to my another mailbox, so haven't seen this one. The comment is wrong. page ->inuse represents the number of objects in use in this zspage; not "the pages number". usage example: zspage_full() : page->inuse == page->objects obj_malloc() : first_page->inuse++ obj_free() : first_page->inuse-- -ss