Re: [PATCH v3 2/2] memblock: use binary search to locate candidate regions
From: Mike Rapoport
Date: Thu Oct 08 2026 - 06:06:05 EST
On Wed, Oct 07, 2026 at 02:06:56PM +0000, tarunsahu@xxxxxxxxxx wrote:
> Mike Rapoport <rppt@xxxxxxxxxx> 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.