mm, slab: shorten kmalloc cache names for large sizes
authorVlastimil Babka <[email protected]>
Fri, 26 Oct 2018 22:05:55 +0000 (15:05 -0700)
committerLinus Torvalds <[email protected]>
Fri, 26 Oct 2018 23:26:32 +0000 (16:26 -0700)
commitf0d77874143df90f9831f30254eb149fc4d76b40
tree48fa839fff7cb661bd6a5546c599969e3879675a
parent61f94e18de94f79abaad3bb83549ff78923ac785
mm, slab: shorten kmalloc cache names for large sizes

Kmalloc cache names can get quite long for large object sizes, when the
sizes are expressed in bytes.  Use 'k' and 'M' prefixes to make the names
as short as possible e.g.  in /proc/slabinfo.  This works, as we mostly
use power-of-two sizes, with exceptions only below 1k.

Example: 'kmalloc-4194304' becomes 'kmalloc-4M'

Link: http://lkml.kernel.org/r/[email protected]
Suggested-by: Matthew Wilcox <[email protected]>
Signed-off-by: Vlastimil Babka <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Laura Abbott <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Vijayanand Jitta <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/slab_common.c