From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
gioh.kim@lge.com,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC zsmalloc 1/4] zsmalloc: keep max_object in size_class
Date: Mon, 10 Aug 2015 17:06:24 +0900 [thread overview]
Message-ID: <20150810080624.GA600@swordfish> (raw)
In-Reply-To: <1439190743-13933-2-git-send-email-minchan@kernel.org>
On (08/10/15 16:12), Minchan Kim wrote:
> Every zspage in a size_class has same max_objects so we could
> move it to a size_class.
>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> mm/zsmalloc.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index f135b1b..491491a 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -33,8 +33,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
> @@ -206,6 +204,7 @@ struct size_class {
> * of ZS_ALIGN.
> */
> int size;
> + int max_objects;
may be change it to objs_per_zspage or something similar? we have
class->pages_per_zspage, so class->objs_per_zspage sounds ok.
otherwise, it's class->max_objects, which gives a false feeling
that there is class's limit on objects, not zspages's.
-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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
gioh.kim@lge.com,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC zsmalloc 1/4] zsmalloc: keep max_object in size_class
Date: Mon, 10 Aug 2015 17:06:24 +0900 [thread overview]
Message-ID: <20150810080624.GA600@swordfish> (raw)
In-Reply-To: <1439190743-13933-2-git-send-email-minchan@kernel.org>
On (08/10/15 16:12), Minchan Kim wrote:
> Every zspage in a size_class has same max_objects so we could
> move it to a size_class.
>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> mm/zsmalloc.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index f135b1b..491491a 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -33,8 +33,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
> @@ -206,6 +204,7 @@ struct size_class {
> * of ZS_ALIGN.
> */
> int size;
> + int max_objects;
may be change it to objs_per_zspage or something similar? we have
class->pages_per_zspage, so class->objs_per_zspage sounds ok.
otherwise, it's class->max_objects, which gives a false feeling
that there is class's limit on objects, not zspages's.
-ss
next prev parent reply other threads:[~2015-08-10 8:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 7:12 [RFC zsmalloc 0/4] meta diet Minchan Kim
2015-08-10 7:12 ` Minchan Kim
2015-08-10 7:12 ` [RFC zsmalloc 1/4] zsmalloc: keep max_object in size_class Minchan Kim
2015-08-10 7:12 ` Minchan Kim
2015-08-10 8:06 ` Sergey Senozhatsky [this message]
2015-08-10 8:06 ` Sergey Senozhatsky
2015-08-10 7:12 ` [RFC zsmalloc 2/4] zsmalloc: squeeze inuse into page->mapping Minchan Kim
2015-08-10 7:12 ` Minchan Kim
2015-08-10 8:53 ` Sergey Senozhatsky
2015-08-10 8:53 ` Sergey Senozhatsky
2015-08-10 7:12 ` [RFC zsmalloc 3/4] zsmalloc: squeeze freelist " Minchan Kim
2015-08-10 7:12 ` Minchan Kim
2015-08-10 7:12 ` [RFC zsmalloc 4/4] zsmalloc: move struct zs_meta from mapping to somewhere Minchan Kim
2015-08-10 7:12 ` Minchan Kim
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=20150810080624.GA600@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gioh.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=sergey.senozhatsky@gmail.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.