tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: 8a0b7a30e285f66c8369f9f77c5784d8240ba1b3 commit: eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0 [262/266] zsmalloc: make zspage chain size configurable config: parisc64-allyesconfig compiler: hppa64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0 git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git git fetch --no-tags akpm-mm mm-unstable git checkout eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): In file included from include/vdso/const.h:5, from include/linux/const.h:4, from include/linux/list.h:9, from include/linux/module.h:12, from mm/zsmalloc.c:40: >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:224:39: note: in expansion of macro 'ZS_SIZE_CLASSES' 224 | struct size_class *size_class[ZS_SIZE_CLASSES]; | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:224:39: note: in expansion of macro 'ZS_SIZE_CLASSES' 224 | struct size_class *size_class[ZS_SIZE_CLASSES]; | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:224:28: error: variably modified 'size_class' at file scope 224 | struct size_class *size_class[ZS_SIZE_CLASSES]; | ^~~~~~~~~~ In file included from include/linux/build_bug.h:5, from include/linux/container_of.h:5, from include/linux/list.h:5: mm/zsmalloc.c: In function 'get_size_class_index': >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/compiler.h:77:45: note: in definition of macro 'likely' 77 | # define likely(x) __builtin_expect(!!(x), 1) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:561:27: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 561 | if (likely(size > ZS_MIN_ALLOC_SIZE)) | ^~~~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/compiler.h:77:45: note: in definition of macro 'likely' 77 | # define likely(x) __builtin_expect(!!(x), 1) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:561:27: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 561 | if (likely(size > ZS_MIN_ALLOC_SIZE)) | ^~~~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:562:43: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 562 | idx = DIV_ROUND_UP(size - ZS_MIN_ALLOC_SIZE, | ^~~~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:562:43: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 562 | idx = DIV_ROUND_UP(size - ZS_MIN_ALLOC_SIZE, | ^~~~~~~~~~~~~~~~~ In file included from include/linux/kernel.h:26, from include/linux/cpumask.h:10, from include/linux/mm_types_task.h:14, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from include/linux/module.h:14: >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:28:27: note: in definition of macro '__cmp' 28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:28:27: note: in definition of macro '__cmp' 28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:28:40: note: in definition of macro '__cmp' 28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:28:40: note: in definition of macro '__cmp' 28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:31:39: note: in definition of macro '__cmp_once' 31 | typeof(x) unique_x = (x); \ | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/linux/minmax.h:31:39: note: in definition of macro '__cmp_once' 31 | typeof(x) unique_x = (x); \ | ^ include/linux/minmax.h:126:33: note: in expansion of macro '__careful_cmp' 126 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ mm/zsmalloc.c:565:16: note: in expansion of macro 'min_t' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~ include/linux/math.h:37:22: note: in expansion of macro '__KERNEL_DIV_ROUND_UP' 37 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | ^~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:565:27: note: in expansion of macro 'ZS_SIZE_CLASSES' 565 | return min_t(int, ZS_SIZE_CLASSES - 1, idx); | ^~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'zs_stats_size_show': >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:625:25: note: in expansion of macro 'ZS_SIZE_CLASSES' 625 | for (i = 0; i < ZS_SIZE_CLASSES; i++) { | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:625:25: note: in expansion of macro 'ZS_SIZE_CLASSES' 625 | for (i = 0; i < ZS_SIZE_CLASSES; i++) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'async_free_zspage': >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2057:25: note: in expansion of macro 'ZS_SIZE_CLASSES' 2057 | for (i = 0; i < ZS_SIZE_CLASSES; i++) { | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2057:25: note: in expansion of macro 'ZS_SIZE_CLASSES' 2057 | for (i = 0; i < ZS_SIZE_CLASSES; i++) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'zs_compact': >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2207:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2207 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2207:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2207 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'zs_shrinker_count': >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2251:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2251 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2251:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2251 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'zs_create_pool': mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2333:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2333 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2333:18: note: in expansion of macro 'ZS_SIZE_CLASSES' 2333 | for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ mm/zsmalloc.c:119:28: note: in definition of macro 'MAX' 119 | #define MAX(a, b) ((a) >= (b) ? (a) : (b)) | ^ mm/zsmalloc.c:2340:24: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 2340 | size = ZS_MIN_ALLOC_SIZE + i * ZS_SIZE_CLASS_DELTA; | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ mm/zsmalloc.c:119:40: note: in definition of macro 'MAX' 119 | #define MAX(a, b) ((a) >= (b) ? (a) : (b)) | ^ mm/zsmalloc.c:2340:24: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 2340 | size = ZS_MIN_ALLOC_SIZE + i * ZS_SIZE_CLASS_DELTA; | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c: In function 'zs_destroy_pool': mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX' 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~~ mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE' 140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ | ^~~~~~~~~~~~~~~~~ mm/zsmalloc.c:2430:25: note: in expansion of macro 'ZS_SIZE_CLASSES' 2430 | for (i = 0; i < ZS_SIZE_CLASSES; i++) { | ^~~~~~~~~~~~~~~ mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow] 122 | MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) | ^~ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ vim +/size_class +224 mm/zsmalloc.c cf8e0fedf0784e mm/zsmalloc.c Jerome Marchand 2017-07-10 118 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 119 #define MAX(a, b) ((a) >= (b) ? (a) : (b)) 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 120 /* ZS_MIN_ALLOC_SIZE must be multiple of ZS_ALIGN */ 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 121 #define ZS_MIN_ALLOC_SIZE \ eab24cc5a373f2 mm/zsmalloc.c Sergey Senozhatsky 2023-01-09 @122 MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS)) 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 123 /* each chunk includes extra space to keep handle */ 7b60a68529b0d8 mm/zsmalloc.c Minchan Kim 2015-04-15 124 #define ZS_MAX_ALLOC_SIZE PAGE_SIZE 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 125 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 126 /* 7eb52512a97785 mm/zsmalloc.c Weijie Yang 2014-06-04 127 * On systems with 4K page size, this gives 255 size classes! There is a 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 128 * trader-off here: 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 129 * - Large number of size classes is potentially wasteful as free page are 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 130 * spread across these classes 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 131 * - Small number of size classes causes large internal fragmentation 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 132 * - Probably its better to use specific size classes (empirically 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 133 * determined). NOTE: all those class sizes must be set as multiple of 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 134 * ZS_ALIGN to make sure link_free itself never has to span 2 pages. 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 135 * 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 136 * ZS_MIN_ALLOC_SIZE and ZS_SIZE_CLASS_DELTA must be multiple of ZS_ALIGN 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 137 * (reason above) 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 138 */ 3783689a1aa82e mm/zsmalloc.c Minchan Kim 2016-07-26 139 #define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> CLASS_BITS) cf8e0fedf0784e mm/zsmalloc.c Jerome Marchand 2017-07-10 140 #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ cf8e0fedf0784e mm/zsmalloc.c Jerome Marchand 2017-07-10 141 ZS_SIZE_CLASS_DELTA) + 1) 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 142 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 143 enum fullness_group { 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 144 ZS_EMPTY, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 145 ZS_ALMOST_EMPTY, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 146 ZS_ALMOST_FULL, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 147 ZS_FULL, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 148 NR_ZS_FULLNESS, 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 149 }; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 150 3828a76470792a mm/zsmalloc.c Minchan Kim 2022-01-21 151 enum class_stat_type { 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 152 CLASS_EMPTY, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 153 CLASS_ALMOST_EMPTY, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 154 CLASS_ALMOST_FULL, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 155 CLASS_FULL, 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 156 OBJ_ALLOCATED, 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 157 OBJ_USED, 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 158 NR_ZS_STAT_TYPE, 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 159 }; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 160 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 161 struct zs_size_stat { 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 162 unsigned long objs[NR_ZS_STAT_TYPE]; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 163 }; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 164 57244594195fe6 mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 165 #ifdef CONFIG_ZSMALLOC_STAT 57244594195fe6 mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 166 static struct dentry *zs_stat_root; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 167 #endif 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 168 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 169 /* 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 170 * We assign a page to ZS_ALMOST_EMPTY fullness group when: 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 171 * n <= N / f, where 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 172 * n = number of allocated objects 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 173 * N = total number of objects zspage can store 6dd9737e31504f mm/zsmalloc.c Wang Sheng-Hui 2014-10-09 174 * f = fullness_threshold_frac 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 175 * 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 176 * Similarly, we assign zspage to: 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 177 * ZS_ALMOST_FULL when n > N / f 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 178 * ZS_EMPTY when n == 0 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 179 * ZS_FULL when n == N 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 180 * 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 181 * (see: fix_fullness_group()) 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 182 */ 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 183 static const int fullness_threshold_frac = 4; 010b495e2fa323 mm/zsmalloc.c Sergey Senozhatsky 2018-04-05 184 static size_t huge_class_size; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 185 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 186 struct size_class { 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 187 struct list_head fullness_list[NR_ZS_FULLNESS]; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 188 /* 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 189 * Size of objects stored in this class. Must be multiple 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 190 * of ZS_ALIGN. 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 191 */ 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 192 int size; 1fc6e27d7b8613 mm/zsmalloc.c Minchan Kim 2016-07-26 193 int objs_per_zspage; 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 194 /* Number of PAGE_SIZE sized pages to combine to form a 'zspage' */ 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 195 int pages_per_zspage; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 196 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 197 unsigned int index; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 198 struct zs_size_stat stats; 48b4800a1c6af2 mm/zsmalloc.c Minchan Kim 2016-07-26 199 }; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 200 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 201 /* 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 202 * Placed within free objects to form a singly linked list. 3783689a1aa82e mm/zsmalloc.c Minchan Kim 2016-07-26 203 * For every zspage, zspage->freeobj gives head of this list. 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 204 * 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 205 * This must be power of 2 and less than or equal to ZS_ALIGN 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 206 */ 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 207 struct link_free { 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 208 union { 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 209 /* bfd093f5e7f09c mm/zsmalloc.c Minchan Kim 2016-07-26 210 * Free object index; 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 211 * It's valid for non-allocated object 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 212 */ bfd093f5e7f09c mm/zsmalloc.c Minchan Kim 2016-07-26 213 unsigned long next; 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 214 /* 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 215 * Handle of allocated object. 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 216 */ 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 217 unsigned long handle; 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 218 }; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 219 }; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 220 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 221 struct zs_pool { 6f3526d6db7cbe mm/zsmalloc.c Sergey SENOZHATSKY 2015-11-06 222 const char *name; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 223 cf8e0fedf0784e mm/zsmalloc.c Jerome Marchand 2017-07-10 @224 struct size_class *size_class[ZS_SIZE_CLASSES]; 2e40e163a25af3 mm/zsmalloc.c Minchan Kim 2015-04-15 225 struct kmem_cache *handle_cachep; 3783689a1aa82e mm/zsmalloc.c Minchan Kim 2016-07-26 226 struct kmem_cache *zspage_cachep; 0959c63f11c3bb drivers/staging/zsmalloc/zsmalloc-main.c Seth Jennings 2012-08-08 227 13de8933c96b45 mm/zsmalloc.c Minchan Kim 2014-10-09 228 atomic_long_t pages_allocated; 0f050d997e275c mm/zsmalloc.c Ganesh Mahendran 2015-02-12 229 7d3f3938236b4b mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 230 struct zs_pool_stats stats; ab9d306d9c3bf6 mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 231 ab9d306d9c3bf6 mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 232 /* Compact classes */ ab9d306d9c3bf6 mm/zsmalloc.c Sergey Senozhatsky 2015-09-08 233 struct shrinker shrinker; 93144ca35041b0 mm/zsmalloc.c Aliaksei Karaliou 2018-01-31 234 :::::: The code at line 224 was first introduced by commit :::::: cf8e0fedf0784ef4bc1889380b09eda295e3d109 mm/zsmalloc: simplify zs_max_alloc_size handling :::::: TO: Jerome Marchand :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests