From: Shahab Vahedi <Shahab.Vahedi@synopsys.com>
To: David Hildenbrand <david@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Oscar Salvador <osalvador@suse.de>,
Jianyong Wu <Jianyong.Wu@arm.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Vineet Gupta <vgupta@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Eric Biederman <ebiederm@xmission.com>,
Arnd Bergmann <arnd@arndb.de>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
"linux-m68k@lists.linux-m68k.org"
<linux-m68k@lists.linux-m68k.org>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH v2 3/5] memblock: allow to specify flags with memblock_add_node()
Date: Mon, 4 Oct 2021 19:31:41 +0000 [thread overview]
Message-ID: <26257713-7e2e-f3bd-8d8e-73d664193f68@synopsys.com> (raw)
In-Reply-To: <20211004093605.5830-4-david@redhat.com>
On 10/4/21 11:36 AM, David Hildenbrand wrote:
> We want to specify flags when hotplugging memory. Let's prepare to pass
> flags to memblock_add_node() by adjusting all existing users.
>
> Note that when hotplugging memory the system is already up and running
> and we might have concurrent memblock users: for example, while we're
> hotplugging memory, kexec_file code might search for suitable memory
> regions to place kexec images. It's important to add the memory directly
> to memblock via a single call with the right flags, instead of adding the
> memory first and apply flags later: otherwise, concurrent memblock users
> might temporarily stumble over memblocks with wrong flags, which will be
> important in a follow-up patch that introduces a new flag to properly
> handle add_memory_driver_managed().
>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Acked-by: Heiko Carstens <hca@linux.ibm.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> arch/arc/mm/init.c | 4 ++--
> arch/ia64/mm/contig.c | 2 +-
> arch/ia64/mm/init.c | 2 +-
> arch/m68k/mm/mcfmmu.c | 3 ++-
> arch/m68k/mm/motorola.c | 6 ++++--
> arch/mips/loongson64/init.c | 4 +++-
> arch/mips/sgi-ip27/ip27-memory.c | 3 ++-
> arch/s390/kernel/setup.c | 3 ++-
> include/linux/memblock.h | 3 ++-
> include/linux/mm.h | 2 +-
> mm/memblock.c | 9 +++++----
> mm/memory_hotplug.c | 2 +-
> 12 files changed, 26 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
> index 699ecf119641..110eb69e9bee 100644
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -59,13 +59,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
>
> low_mem_sz = size;
> in_use = 1;
> - memblock_add_node(base, size, 0);
> + memblock_add_node(base, size, 0, MEMBLOCK_NONE);
> } else {
> #ifdef CONFIG_HIGHMEM
> high_mem_start = base;
> high_mem_sz = size;
> in_use = 1;
> - memblock_add_node(base, size, 1);
> + memblock_add_node(base, size, 1, MEMBLOCK_NONE);
> memblock_reserve(base, size);
> #endif
arch/arc part: Acked-by: Shahab Vahedi <shahab@synopsys.com>
--
Shahab
next prev parent reply other threads:[~2021-10-04 19:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 9:36 [PATCH v2 0/5] mm/memory_hotplug: full support for add_memory_driver_managed() with CONFIG_ARCH_KEEP_MEMBLOCK David Hildenbrand
2021-10-04 9:36 ` [PATCH v2 1/5] mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource() David Hildenbrand
2021-10-04 9:36 ` [PATCH v2 2/5] memblock: improve MEMBLOCK_HOTPLUG documentation David Hildenbrand
2021-10-06 0:35 ` Mike Rapoport
2021-10-04 9:36 ` [PATCH v2 3/5] memblock: allow to specify flags with memblock_add_node() David Hildenbrand
2021-10-04 19:31 ` Shahab Vahedi [this message]
2021-10-06 0:36 ` Mike Rapoport
2021-10-04 9:36 ` [PATCH v2 4/5] memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED David Hildenbrand
2021-10-06 0:35 ` Mike Rapoport
2021-10-04 9:36 ` [PATCH v2 5/5] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED David Hildenbrand
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=26257713-7e2e-f3bd-8d8e-73d664193f68@synopsys.com \
--to=shahab.vahedi@synopsys.com \
--cc=Jianyong.Wu@arm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=borntraeger@de.ibm.com \
--cc=chenhuacai@kernel.org \
--cc=david@redhat.com \
--cc=ebiederm@xmission.com \
--cc=geert@linux-m68k.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=rppt@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=vgupta@kernel.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