From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Xiang Gao <gxxa03070307@gmail.com>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
gaoxiang17 <gaoxiang17@xiaomi.com>
Subject: Re: [PATCH] mm/page_alloc: Add some comments for specific scenarios to make it easier to understand why unmovable and reclaimable allocations can steal from moveable pageblocks by default.
Date: Thu, 19 Sep 2024 15:20:09 +0530 [thread overview]
Message-ID: <069fea6a-3c14-49c8-b9d6-72b49616ff2e@arm.com> (raw)
In-Reply-To: <20240918045836.10825-1-gxxa03070307@gmail.com>
The subject line is too big.
On 9/18/24 10:28, Xiang Gao wrote:
> From: gaoxiang17 <gaoxiang17@xiaomi.com>
Also there is no commit message here as well.
Please do follow the instructions for submitting patches as explained
in the documentation below and then resend the patch.
https://www.kernel.org/doc/html/v6.11/process/submitting-patches.html
>
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
> ---
> mm/page_alloc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 91ace8ca97e2..cc8a7a0772cb 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1818,6 +1818,13 @@ static bool can_steal_fallback(unsigned int order, int start_mt)
> if (order >= pageblock_order)
> return true;
>
> + /*
> + * The reasons why unmovable and reclaimable allocations can steal from
> + * moveable pageblocks by default aside from the above comments, a different
> + * and better understood scenario is: System initializations are all movable
> + * pageblocks. If you want to alloc unmovable and reclaimable pages,
> + * you have to steal from moveable pageblocks or it may fail.
> + */
Although there are sufficient comments for this particular function, it
does seem like this new comment tries to explain why using unmovable and
reclaimable migrate types as steal fallback makes sense. But this can use
some clean up and rewriting.
> if (order >= pageblock_order / 2 ||
> start_mt == MIGRATE_RECLAIMABLE ||
> start_mt == MIGRATE_UNMOVABLE ||
prev parent reply other threads:[~2024-09-19 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 4:58 Xiang Gao
2024-09-19 9:50 ` Anshuman Khandual [this message]
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=069fea6a-3c14-49c8-b9d6-72b49616ff2e@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=gaoxiang17@xiaomi.com \
--cc=gxxa03070307@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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