On Tue, May 26, 2020 at 12:48:38AM +0900, DaeRoLee wrote: > Sorry for the invalid mail format.. > > Actually, I didn't experience a real issue. > > On second thought, I totally agree with you. > > Could you explain "size" in "min_addr + size -1"? > Does this mean memblock size? "size" is the allocation size. It could be that there is no free slot above min_addr, but there is free memory slightly below it. If you ceil the second search by min_addr, the allocation must start below min_addr - size, rather than below min_addr. -- Sincerely yours, Mike.