Re: [PATCH v2] memblock: don't run loop in memblock_add_range() twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 25, 2022 at 03:09:43PM +0800, Yajun Deng wrote:
> There is no need round twice in memblock_add_range().
> 
> We can call memblock_double_array() to extend the size if type->cnt
> greater or equal to type->max before memblock_insert_region(); otherwise,
> we can insert the new region directly.
> 
> v2:
>  - Add a comment when the allocation is required.
> 
> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
> ---
>  mm/memblock.c | 69 ++++++++++++++++++---------------------------------
>  1 file changed, 24 insertions(+), 45 deletions(-)

Applied, thanks!




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux