]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm/memblock: reduce overhead in binary search
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Fri, 28 Sep 2012 00:19:43 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Oct 2012 04:37:59 +0000 (15:37 +1100)
commit67c01d8226fded320b9d19a12e73751e946d62ee
treec290a57ae49dc6ede6c5693844a9e339a93e3e74
parent0503b9b1badd9777e3611aa6f82f9122f70ae2ef
mm/memblock: reduce overhead in binary search

When checking that the indicated address belongs to the memory region, the
memory regions are checked one by one through a binary search, which will
be time consuming.

If the indicated address isn't in the memory region, then we needn't do
the time-consuming search.  Add a check on the indicated address for that
purpose.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memblock.c