From: Oscar Salvador <osalvador@suse.de>
To: Leonardo Bras <leonardo@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Mike Rapoport" <rppt@linux.ibm.com>,
"Michal Hocko" <mhocko@suse.com>,
"Pavel Tatashin" <pasha.tatashin@oracle.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Pasha Tatashin" <Pavel.Tatashin@microsoft.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 1/1] mm/memory_hotplug: Adds option to hot-add memory in ZONE_MOVABLE
Date: Thu, 18 Jul 2019 08:12:33 +0200 [thread overview]
Message-ID: <1563430353.3077.1.camel@suse.de> (raw)
In-Reply-To: <20190718024133.3873-1-leonardo@linux.ibm.com>
On Wed, 2019-07-17 at 23:41 -0300, Leonardo Bras wrote:
> Adds an option on kernel config to make hot-added memory online in
> ZONE_MOVABLE by default.
>
> This would be great in systems with MEMORY_HOTPLUG_DEFAULT_ONLINE=y
> by
> allowing to choose which zone it will be auto-onlined
We do already have "movable_node" boot option, which exactly has that
effect.
Any hotplugged range will be placed in ZONE_MOVABLE.
Why do we need yet another option to achieve the same? Was not that
enough for your case?
>
> Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
> ---
> drivers/base/memory.c | 3 +++
> mm/Kconfig | 14 ++++++++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/drivers/base/memory.c b/drivers/base/memory.c
> index f180427e48f4..378b585785c1 100644
> --- a/drivers/base/memory.c
> +++ b/drivers/base/memory.c
> @@ -670,6 +670,9 @@ static int init_memory_block(struct memory_block
> **memory,
> mem->state = state;
> start_pfn = section_nr_to_pfn(mem->start_section_nr);
> mem->phys_device = arch_get_memory_phys_device(start_pfn);
> +#ifdef CONFIG_MEMORY_HOTPLUG_MOVABLE
> + mem->online_type = MMOP_ONLINE_MOVABLE;
> +#endif
>
> ret = register_memory(mem);
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index f0c76ba47695..74e793720f43 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -180,6 +180,20 @@ config MEMORY_HOTREMOVE
> depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
> depends on MIGRATION
>
> +config MEMORY_HOTPLUG_MOVABLE
> + bool "Enhance the likelihood of hot-remove"
> + depends on MEMORY_HOTREMOVE
> + help
> + This option sets the hot-added memory zone to MOVABLE
> which
> + drastically reduces the chance of a hot-remove to fail due
> to
> + unmovable memory segments. Kernel memory can't be
> allocated in
> + this zone.
> +
> + Say Y here if you want to have better chance to hot-remove
> memory
> + that have been previously hot-added.
> + Say N here if you want to make all hot-added memory
> available to
> + kernel space.
> +
> # Heavily threaded applications may benefit from splitting the mm-
> wide
> # page_table_lock, so that faults on different parts of the user
> address
> # space can be handled with less contention: split it at this
> NR_CPUS.
--
Oscar Salvador
SUSE L3
next prev parent reply other threads:[~2019-07-18 6:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 2:41 [PATCH 1/1] mm/memory_hotplug: Adds option to hot-add memory in ZONE_MOVABLE Leonardo Bras
2019-07-18 6:12 ` Oscar Salvador [this message]
2019-07-18 15:50 ` Leonardo Bras
2019-07-18 15:57 ` Michal Hocko
2019-07-18 16:11 ` Pavel Tatashin
2019-07-18 16:40 ` Michal Hocko
2019-07-18 16:43 ` Pavel Tatashin
2019-07-18 6:26 ` Mike Rapoport
2019-07-18 12:19 ` Pavel Tatashin
2019-07-18 16:03 ` Leonardo Bras
2019-07-18 16:45 ` Pavel Tatashin
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=1563430353.3077.1.camel@suse.de \
--to=osalvador@suse.de \
--cc=Pavel.Tatashin@microsoft.com \
--cc=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jglisse@redhat.com \
--cc=leonardo@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pasha.tatashin@oracle.com \
--cc=rafael@kernel.org \
--cc=rppt@linux.ibm.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.