From: Andrew Morton <akpm@linux-foundation.org>
To: Oscar Salvador <osalvador@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
Abhishek Goel <huntbag@linux.vnet.ibm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Only re-generate demotion targets when a numa node changes its N_CPU state
Date: Wed, 9 Mar 2022 13:02:49 -0800 [thread overview]
Message-ID: <20220309130249.60733272aafb3bd5f2e6b88c@linux-foundation.org> (raw)
In-Reply-To: <20220309144644.4278-1-osalvador@suse.de>
On Wed, 9 Mar 2022 15:46:44 +0100 Oscar Salvador <osalvador@suse.de> wrote:
> Abhishek reported that after patch [1], hotplug operations are
> taking ~double the expected time. [2]
>
> The reason behind is that the CPU callbacks that migrate_on_reclaim_init()
> sets always call set_migration_target_nodes() whenever a CPU is brought
> up/down.
> But we only care about numa nodes going from having cpus to become
> cpuless, and vice versa, as that influences the demotion_target order.
>
> We do already have two CPU callbacks (vmstat_cpu_online() and vmstat_cpu_dead())
> that check exactly that, so get rid of the CPU callbacks in
> migrate_on_reclaim_init() and only call set_migration_target_nodes() from
> vmstat_cpu_{dead,online}() whenever a numa node change its N_CPU state.
>
> [1] https://lore.kernel.org/linux-mm/20210721063926.3024591-2-ying.huang@intel.com/
> [2] https://lore.kernel.org/linux-mm/eb438ddd-2919-73d4-bd9f-b7eecdd9577a@linux.vnet.ibm.com/
>
> ...
>
> extern bool numa_demotion_enabled;
> +#ifdef CONFIG_HOTPLUG_CPU
> +extern void set_migration_target_nodes(void);
> +#else
> +static inline void set_migration_target_nodes() {}
Compiler won't like that. Please test (compile and runtime) with
CONFIG_HOTPLUG_CPU=n.
>
> ...
>
next prev parent reply other threads:[~2022-03-09 21:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 14:46 Oscar Salvador
2022-03-09 21:02 ` Andrew Morton [this message]
2022-03-09 21:55 ` Oscar Salvador
2022-03-10 0:39 ` Huang, Ying
2022-03-10 5:48 ` Oscar Salvador
2022-03-10 6:24 ` Baolin Wang
2022-03-10 0:56 ` kernel test robot
2022-03-10 1:17 ` kernel test robot
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=20220309130249.60733272aafb3bd5f2e6b88c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=huntbag@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=ying.huang@intel.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