All of lore.kernel.org
 help / color / mirror / Atom feed
* + zsmalloc-add-comments-for-inuse-to-zspage.patch added to -mm tree
@ 2015-09-23 21:53 akpm
  2015-09-24  3:49 ` Sergey Senozhatsky
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2015-09-23 21:53 UTC (permalink / raw)
  To: zhuhui, ddstreet, minchan, sergey.senozhatsky, mm-commits


The patch titled
     Subject: zsmalloc: add comments for ->inuse to zspage
has been added to the -mm tree.  Its filename is
     zsmalloc-add-comments-for-inuse-to-zspage.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/zsmalloc-add-comments-for-inuse-to-zspage.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/zsmalloc-add-comments-for-inuse-to-zspage.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
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
  *
  * Usage of struct page flags:
  *	PG_private: identifies the first component page
_

Patches currently in -mm which might be from zhuhui@xiaomi.com are

zsmalloc-add-comments-for-inuse-to-zspage.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: + zsmalloc-add-comments-for-inuse-to-zspage.patch added to -mm tree
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2015-09-24  3:49 UTC (permalink / raw)
  To: akpm
  Cc: zhuhui, ddstreet, minchan, sergey.senozhatsky, mm-commits, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-24  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.