From: Andrew Morton <akpm@linux-foundation.org>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/page_ext: remove rollback for untouched mem_section in online_page_ext
Date: Fri, 14 Jul 2023 10:54:22 -0700 [thread overview]
Message-ID: <20230714105422.648d17f9ba6141f26e469423@linux-foundation.org> (raw)
In-Reply-To: <20230714114749.1743032-3-shikemeng@huaweicloud.com>
On Fri, 14 Jul 2023 19:47:48 +0800 Kemeng Shi <shikemeng@huaweicloud.com> wrote:
> If init_section_page_ext failed, we only need rollback for mem_section
> before failed mem_section. Make rollback end point to failed mem_section
> to remove unnecessary rollback.
>
> As pfn += PAGES_PER_SECTION will be executed even if init_section_page_ext
> failed. So pfn points to mem_section after failed mem_section. Subtract
> one mem_section from pfn to get failed mem_section.
>
> ...
>
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -424,6 +424,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
> return 0;
>
> /* rollback */
> + end = pfn - PAGES_PER_SECTION;
> for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION)
> __free_page_ext(pfn);
>
This is a bugfix, yes?
I guess init_section_page_ext() never fails for anyone...
next prev parent reply other threads:[~2023-07-14 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230714114749.1743032-1-shikemeng@huaweicloud.com>
2023-07-14 11:47 ` [PATCH 3/3] mm/page_ext: move functions around for minor cleanups to page_ext Kemeng Shi
[not found] ` <20230714114749.1743032-3-shikemeng@huaweicloud.com>
2023-07-14 17:54 ` Andrew Morton [this message]
2023-07-17 1:47 ` [PATCH 2/3] mm/page_ext: remove rollback for untouched mem_section in online_page_ext Kemeng Shi
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=20230714105422.648d17f9ba6141f26e469423@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shikemeng@huaweicloud.com \
/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