]> git.baikalelectronics.ru Git - kernel.git/commit
staging: zsmalloc: make CLASS_DELTA relative to PAGE_SIZE
authorSeth Jennings <sjenning@linux.vnet.ibm.com>
Fri, 25 Jan 2013 17:46:18 +0000 (11:46 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2013 04:16:42 +0000 (23:16 -0500)
commit2f84eb8e32a0df0d9efe85d0172bcb82df25309a
treec57b4750cf0c14723ca1a5c7f6850e1ae155c760
parentac1c034225787efca84dd373bf626bb72c5d8b54
staging: zsmalloc: make CLASS_DELTA relative to PAGE_SIZE

Right now ZS_SIZE_CLASS_DELTA is hardcoded to be 16.  This
creates 254 classes for systems with 4k pages. However, on
PPC64 with 64k pages, it creates 4095 classes which is far
too many.

This patch makes ZS_SIZE_CLASS_DELTA relative to PAGE_SIZE
so that regardless of the page size, there will be the same
number of classes.

Acked-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zsmalloc/zsmalloc-main.c