linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leonardo Bras <leonardo@linux.ibm.com>
To: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	"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 13:03:42 -0300	[thread overview]
Message-ID: <6cd8f8f753881aa14d9dfec9a018326abc1e3847.camel@linux.ibm.com> (raw)
In-Reply-To: <CA+CK2bBu7DnG73SaBDwf9cBceNvKnZDEqA-gBJmKC9K_rqgO+A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]

On Thu, 2019-07-18 at 08:19 -0400, Pavel Tatashin wrote:
> On Wed, Jul 17, 2019 at 10:42 PM Leonardo Bras <leonardo@linux.ibm.com> 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
> 
> This is a desired feature. From reading the code it looks to me that
> auto-selection of online method type should be done in
> memory_subsys_online().
> 
> When it is called from device online, mem->online_type should be -1:
> 
> if (mem->online_type < 0)
>      mem->online_type = MMOP_ONLINE_KEEP;
> 
> Change it to:
> if (mem->online_type < 0)
>      mem->online_type = MMOP_DEFAULT_ONLINE_TYPE;
> 
> And in "linux/memory_hotplug.h"
> #ifdef CONFIG_MEMORY_HOTPLUG_MOVABLE
> #define MMOP_DEFAULT_ONLINE_TYPE MMOP_ONLINE_MOVABLE
> #else
> #define MMOP_DEFAULT_ONLINE_TYPE MMOP_ONLINE_KEEP
> #endif
> 
> Could be expanded to support MMOP_ONLINE_KERNEL as well.
> 
> Pasha

Thanks for the suggestions Pasha,

I was made aware there is a kernel boot option "movable_node" that
already creates the behavior I was trying to reproduce.

I was thinking of changing my patch in order to add a config option
that makes this behavior default (i.e. not need to pass it as a boot
parameter.

Do you think that it would still be a desired feature?

Regards,

Leonardo Brás

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-07-18 16:04 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
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 [this message]
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=6cd8f8f753881aa14d9dfec9a018326abc1e3847.camel@linux.ibm.com \
    --to=leonardo@linux.ibm.com \
    --cc=Pavel.Tatashin@microsoft.com \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=pasha.tatashin@soleen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).