]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/slub: calculate start order with reserved in consideration
authorWei Yang <weiyang@linux.vnet.ibm.com>
Wed, 21 Oct 2015 22:02:54 +0000 (09:02 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:02:54 +0000 (09:02 +1100)
commit671480af3e08afe42c9109ad5fe5dbdab51b57c3
tree9c2e9e2929a37fbdf7f1c017f772a810a8b97f17
parent7902132794bd90dbd1e8e400d7362113ae2822c9
mm/slub: calculate start order with reserved in consideration

In slub_order(), the order starts from max(min_order,
get_order(min_objects * size)).  When (min_objects * size) has different
order from (min_objects * size + reserved), it will skip this order via a
check in the loop.

This patch optimizes this a little by calculating the start order with
`reserved' in consideration and removing the check in loop.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slub.c