All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
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
Date: Thu, 24 Sep 2015 12:49:19 +0900	[thread overview]
Message-ID: <20150924034919.GA626@swordfish> (raw)
In-Reply-To: <56031f46.Sso3v1Nk/xNfu2xv%akpm@linux-foundation.org>

On (09/23/15 14:53), akpm@linux-foundation.org wrote:
> ------------------------------------------------------
> From: Hui Zhu <zhuhui@xiaomi.com>
> Subject: zsmalloc: add comments for ->inuse to zspage
> 
> Signed-off-by: Hui Zhu <zhuhui@xiaomi.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Dan Streetman <ddstreet@ieee.org>
> Cc: Minchan Kim <minchan@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  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

      reply	other threads:[~2015-09-24  3:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 21:53 + zsmalloc-add-comments-for-inuse-to-zspage.patch added to -mm tree akpm
2015-09-24  3:49 ` Sergey Senozhatsky [this message]

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=20150924034919.GA626@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=zhuhui@xiaomi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.