[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y1+Ec0+S3du7dkGZ@kernel.org>
Date: Mon, 31 Oct 2022 10:16:51 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] memblock: don't run loop in memblock_add_range() twice
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@...ux.dev>
> ---
> mm/memblock.c | 69 ++++++++++++++++++---------------------------------
> 1 file changed, 24 insertions(+), 45 deletions(-)
Applied, thanks!
Powered by blists - more mailing lists