percpu: keep track of the best offset for contig hints
authorDennis Zhou (Facebook) <dennisszhou@gmail.com>
Mon, 24 Jul 2017 23:02:15 +0000 (19:02 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 26 Jul 2017 21:41:05 +0000 (17:41 -0400)
commit268625a6f9df6a7c9b0ae7707a8a1cd5a9993bd2
tree4f178b5e62a183be1c23a5d058c6eecedbfd67d5
parent13f966373f9296c0da2fb2764654cce520b3a6b4
percpu: keep track of the best offset for contig hints

This patch makes the contig hint starting offset optimization from the
previous patch as honest as it can be. For both chunk and block starting
offsets, make sure it keeps the starting offset with the best alignment.

The block skip optimization is added in a later patch when the
pcpu_find_block_fit iterator is swapped in.

Signed-off-by: Dennis Zhou <dennisszhou@gmail.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu.c