Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577291
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/zsmalloc: fix comment in zsmalloc |
| Date | 2017-02-09 05:10 +0100 |
| Message-ID | <t8Odr-187-3@gated-at.bofh.it> (permalink) |
| References | <t8NAK-Fj-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm/zsmalloc: fix comment in zsmalloc Yisheng Xie <xieyisheng1@huawei.com> - 2017-02-09 04:30 +0100 Re: [PATCH] mm/zsmalloc: fix comment in zsmalloc Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-02-09 05:10 +0100
csiph-web