slab, slub, slob: convert slab_flags_t to 32-bit
authorAlexey Dobriyan <[email protected]>
Thu, 16 Nov 2017 01:32:21 +0000 (17:32 -0800)
committerLinus Torvalds <[email protected]>
Thu, 16 Nov 2017 02:21:01 +0000 (18:21 -0800)
commit4fd0b46e898791009b03b2fdd6510044fa8730a6
treeef78168cf70327d341eaf9fd07f25683dc869262
parentd50112edde1d0c621520e53747044009f11c656b
slab, slub, slob: convert slab_flags_t to 32-bit

struct kmem_cache::flags is "unsigned long" which is unnecessary on
64-bit as no flags are defined in the higher bits.

Switch the field to 32-bit and save some space on x86_64 until such
flags appear:

add/remove: 0/0 grow/shrink: 0/107 up/down: 0/-657 (-657)
function                                     old     new   delta
sysfs_slab_add                               720     719      -1
...
check_object                                 699     676     -23

[[email protected]: fix printk warning]
Link: http://lkml.kernel.org/r/20171021100635.GA8287@avx2
Signed-off-by: Alexey Dobriyan <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/slab.h
include/linux/types.h
mm/slab.c
mm/slub.c