summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorGanesh Mahendran <opensource.ganesh@gmail.com>2016-07-29 00:47:51 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 01:07:41 +0200
commit64d90465f01325653deb8503aec4ca48ca3e9580 (patch)
treee11e75ae92f8f4df349115af4c136c46e75de330 /virt
parentmm/zsmalloc: use class->objs_per_zspage to get num of max objects (diff)
downloadlinux-64d90465f01325653deb8503aec4ca48ca3e9580.tar.xz
linux-64d90465f01325653deb8503aec4ca48ca3e9580.zip
mm/zsmalloc: avoid calculate max objects of zspage twice
Currently, if a class can not be merged, the max objects of zspage in that class may be calculated twice. This patch calculate max objects of zspage at the begin, and pass the value to can_merge() to decide whether the class can be merged. Also this patch remove function get_maxobj_per_zspage(), as there is no other place to call this function. Link: http://lkml.kernel.org/r/1467882338-4300-4-git-send-email-opensource.ganesh@gmail.com Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions