From: Mike Rapoport <rppt@kernel.org>
To: Yajun Deng <yajun.deng@linux.dev>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] memblock: don't run loop in memblock_add_range() twice
Date: Mon, 31 Oct 2022 10:16:51 +0200 [thread overview]
Message-ID: <Y1+Ec0+S3du7dkGZ@kernel.org> (raw)
In-Reply-To: <20221025070943.363578-1-yajun.deng@linux.dev>
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@linux.dev>
> ---
> mm/memblock.c | 69 ++++++++++++++++++---------------------------------
> 1 file changed, 24 insertions(+), 45 deletions(-)
Applied, thanks!
next prev parent reply other threads:[~2022-10-31 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 7:09 [PATCH v2] memblock: don't run loop in memblock_add_range() twice Yajun Deng
2022-10-31 8:16 ` Mike Rapoport [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-10-02 10:56 Yajun Deng
2023-10-03 1:10 ` Yajun Deng
2023-10-03 1:19 Yeah Yeah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1+Ec0+S3du7dkGZ@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yajun.deng@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox