[PATCH v3 2/2] memblock: use binary search to locate candidate regions

Mike Rapoport rppt at kernel.org
Thu Oct 8 03:03:38 PDT 2026


On Wed, Oct 07, 2026 at 02:06:56PM +0000, tarunsahu at google.com wrote:
> Mike Rapoport <rppt at kernel.org> writes:
>
> >> +{
> >> +	int mid, low = 0;
> >> +	int high = type->cnt;
> >> +
> >> +	if (type->cnt && base >= type->regions[type->cnt - 1].base +
> >> +				 type->regions[type->cnt - 1].size)
> >> +		return type->cnt;
> >
> > Using local variables would make it more readable IMHO.
> 
> removing this as per next comment. Let me know what you think? Should we
> keep this optimization or not.

Yeah, that's fine :)
 
> ~Tarun

-- 
Sincerely yours,
Mike.



More information about the kexec mailing list