aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorHui Zhu <[email protected]>2015-11-07 00:29:26 +0000
committerLinus Torvalds <[email protected]>2015-11-07 01:50:42 +0000
commit12a7bfad58cd604616dd5205efa6dc2be6f299eb (patch)
tree29228fe2c4440e1d95eeb64a8c19ef889f9bf744 /fs/proc/array.c
parentzsmalloc: add comments for ->inuse to zspage (diff)
downloadkernel-12a7bfad58cd604616dd5205efa6dc2be6f299eb.tar.gz
kernel-12a7bfad58cd604616dd5205efa6dc2be6f299eb.zip
zsmalloc: fix obj_to_head use page_private(page) as value but not pointer
In obj_malloc(): if (!class->huge) /* record handle in the header of allocated chunk */ link->handle = handle; else /* record handle in first_page->private */ set_page_private(first_page, handle); In the hugepage we save handle to private directly. But in obj_to_head(): if (class->huge) { VM_BUG_ON(!is_first_page(page)); return *(unsigned long *)page_private(page); } else return *(unsigned long *)obj; It is used as a pointer. The reason why there is no problem until now is huge-class page is born with ZS_FULL so it can't be migrated. However, we need this patch for future work: "VM-aware zsmalloced page migration" to reduce external fragmentation. Signed-off-by: Hui Zhu <[email protected]> Acked-by: Minchan Kim <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions