From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Yisheng Xie <xieyisheng1@huawei.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, minchan@kernel.org,
sergey.senozhatsky@gmail.com, ngupta@vflare.org,
guohanjun@huawei.com
Subject: Re: [PATCH] mm/zsmalloc: fix comment in zsmalloc
Date: Thu, 9 Feb 2017 12:55:16 +0900 [thread overview]
Message-ID: <20170209035516.GB2151@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <1486610619-57588-1-git-send-email-xieyisheng1@huawei.com>
On (02/09/17 11:23), Yisheng Xie wrote:
> The class index and fullness group are not encoded in
> (first)page->mapping any more, after commit 3783689a1aa8 ("zsmalloc:
> introduce zspage structure"). Instead, they are store in struct zspage.
>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Nitin Gupta <ngupta@vflare.org>
> Cc: Hanjun Guo <guohanjun@huawei.com>
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
no objections from my side.
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
a side note - may be we don't need this comment at all.
the code looks like this:
/*
* A zspage's class index and fullness group
* are stored in struct zspage.
*/
#define FULLNESS_BITS 2
#define CLASS_BITS 8
#define ISOLATED_BITS 3
#define MAGIC_VAL_BITS 8
struct zspage {
struct {
unsigned int fullness:FULLNESS_BITS;
unsigned int class:CLASS_BITS;
unsigned int isolated:ISOLATED_BITS;
unsigned int magic:MAGIC_VAL_BITS;
};
unsigned int inuse;
unsigned int freeobj;
struct page *first_page;
struct list_head list; /* fullness list */
#ifdef CONFIG_COMPACTION
rwlock_t lock;
#endif
};
so, basically, the comment just "repeats" the next 5 lines.
but, like I said, that's just a side note.
-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>
prev parent reply other threads:[~2017-02-09 3:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 3:23 Yisheng Xie
2017-02-09 3:55 ` 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=20170209035516.GB2151@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=guohanjun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=xieyisheng1@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox