From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
linux-mm@kvack.org, kosaki.motohiro@gmail.com
Subject: Re: [PATCH 2/3] slub, hotplug: ignore unrelated node's hot-adding and hot-removing
Date: Thu, 27 Sep 2012 18:04:47 -0400 [thread overview]
Message-ID: <5064CD7F.1040507@gmail.com> (raw)
In-Reply-To: <1348728470-5580-3-git-send-email-laijs@cn.fujitsu.com>
(9/27/12 2:47 AM), Lai Jiangshan wrote:
> SLUB only fucus on the nodes which has normal memory, so ignore the other
> node's hot-adding and hot-removing.
>
> Aka: if some memroy of a node(which has no onlined memory) is online,
> but this new memory onlined is not normal memory(HIGH memory example),
> we should not allocate kmem_cache_node for SLUB.
>
> And if the last normal memory is offlined, but the node still has memroy,
> we should remove kmem_cache_node for that node.(current code delay it when
> all of the memory is offlined)
>
> so we only do something when marg->status_change_nid_normal > 0.
> marg->status_change_nid is not suitable here.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> mm/slub.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 2fdd96f..2d78639 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -3577,7 +3577,7 @@ static void slab_mem_offline_callback(void *arg)
> struct memory_notify *marg = arg;
> int offline_node;
>
> - offline_node = marg->status_change_nid;
> + offline_node = marg->status_change_nid_normal;
>
> /*
> * If the node still has available memory. we need kmem_cache_node
> @@ -3610,7 +3610,7 @@ static int slab_mem_going_online_callback(void *arg)
> struct kmem_cache_node *n;
> struct kmem_cache *s;
> struct memory_notify *marg = arg;
> - int nid = marg->status_change_nid;
> + int nid = marg->status_change_nid_normal;
> int ret = 0;
Looks reasonable. I think slab need similar fix too.
next prev parent reply other threads:[~2012-09-27 22:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 6:47 [PATCH 0/3] memory_hotplug: fix memory hotplug bug Lai Jiangshan
2012-09-27 6:47 ` [PATCH 1/3] memory_hotplug: fix stale node_states[N_NORMAL_MEMORY] Lai Jiangshan
2012-09-27 14:32 ` Ni zhan Chen
2012-09-28 7:32 ` Lai Jiangshan
2012-09-27 22:03 ` KOSAKI Motohiro
2012-10-26 1:39 ` Lai Jiangshan
2012-09-27 6:47 ` [PATCH 2/3] slub, hotplug: ignore unrelated node's hot-adding and hot-removing Lai Jiangshan
2012-09-27 22:04 ` KOSAKI Motohiro [this message]
2012-09-27 22:35 ` Christoph
2012-09-28 7:19 ` Lai Jiangshan
2012-09-28 22:26 ` KOSAKI Motohiro
2012-10-24 7:06 ` Lai Jiangshan
2012-09-27 6:47 ` [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock() Lai Jiangshan
2012-09-27 13:19 ` Ni zhan Chen
2012-09-28 7:29 ` Lai Jiangshan
2012-09-28 8:04 ` Ni zhan Chen
2012-09-27 22:30 ` KOSAKI Motohiro
2012-09-28 7:39 ` Lai Jiangshan
2012-09-28 0:39 ` [PATCH 0/3] memory_hotplug: fix memory hotplug bug Ni zhan Chen
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=5064CD7F.1040507@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=cl@linux-foundation.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@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;
as well as URLs for NNTP newsgroup(s).