zsmalloc: zspage sanity check
PATCH 1/1 zsmalloc: zspage sanity check
Quoted 30 lines · Minchan Kim
Quoted 19 lines · Vlastimil Babka
On 06/01/2016 01:21 AM, Minchan Kim wrote:
[...]
Quoted 3 lines
Cc Sergey Senozhatsky <[email protected]>Signed-off-by Minchan Kim <[email protected]>I'm not that familiar with zsmalloc, so this is not a full review. I was just curious how it's handling the movable migration API, and stumbled upon some things pointed out below.
Quoted 7 lines
(quoted diff) +2
-0@@ -252,16 +276,23 @@ struct zs_pool { */ #define FULLNESS_BITS 2 #define CLASS_BITS 8 +#define ISOLATED_BITS 3 +#define MAGIC_VAL_BITS 8Quoted 9 lines
Review struct zs_pool { · line 287
Quoted 6 lines
(quoted diff) +2
-0struct zspage { struct { unsigned int fullness:FULLNESS_BITS; unsigned int class:CLASS_BITS; + unsigned int isolated:ISOLATED_BITS; + unsigned int magic:MAGIC_VAL_BITS;This magic seems to be only tested via
VM_BUG_ON, so it's presence should be also guarded by #ifdefDEBUG_VM, no?
Quoted 5 lines
Thanks for the point.
Then, I want to change it to
BUG_ONbecause struct zspage corruption is really risky to work rightly and want to catch on it in real product which disableCONFIG_DEBUG_VMfor a while until make the feature stable.
Andrew,
Please fold this patch into zsmalloc: page migration support. Thanks!