From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] Do not update sysfs cpu registration from invalid context
Date: Mon, 24 Jun 2013 12:18:04 -0500 [thread overview]
Message-ID: <20130624171804.GB3869@cerebellum> (raw)
In-Reply-To: <51C8543F.6080905@linux.vnet.ibm.com>
On Mon, Jun 24, 2013 at 09:14:23AM -0500, Nathan Fontenot wrote:
> The topology update code that updates the cpu node registration in sysfs
> should not be called while in stop_machine(). The register/unregister
> calls take a lock and may sleep.
>
> This patch moves these calls outside of the call to stop_machine().
>
> Signed-off-by:Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/numa.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> Index: powerpc/arch/powerpc/mm/numa.c
> ===================================================================
> --- powerpc.orig/arch/powerpc/mm/numa.c 2013-06-24 06:53:31.000000000 -0500
> +++ powerpc/arch/powerpc/mm/numa.c 2013-06-24 06:56:30.000000000 -0500
> @@ -1433,11 +1433,9 @@
> if (cpu != update->cpu)
> continue;
>
> - unregister_cpu_under_node(update->cpu, update->old_nid);
> unmap_cpu_from_node(update->cpu);
> map_cpu_to_node(update->cpu, update->new_nid);
> vdso_getcpu_init();
> - register_cpu_under_node(update->cpu, update->new_nid);
> }
>
> return 0;
> @@ -1485,6 +1483,9 @@
> stop_machine(update_cpu_topology, &updates[0], &updated_cpus);
>
> for (ud = &updates[0]; ud; ud = ud->next) {
> + unregister_cpu_under_node(update->cpu, update->old_nid);
> + register_cpu_under_node(update->cpu, update->new_nid);
> +
> dev = get_cpu_device(ud->cpu);
> if (dev)
> kobject_uevent(&dev->kobj, KOBJ_CHANGE);
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
next prev parent reply other threads:[~2013-06-24 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 14:14 [PATCH] Do not update sysfs cpu registration from invalid context Nathan Fontenot
2013-06-24 17:18 ` Seth Jennings [this message]
2013-06-24 19:16 ` Seth Jennings
2013-06-24 19:25 ` Nathan Fontenot
2013-06-25 1:50 ` Michael Ellerman
2013-06-25 2:46 ` Nathan Fontenot
2013-06-25 1:50 ` Michael Ellerman
2013-06-25 2:47 ` Nathan Fontenot
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=20130624171804.GB3869@cerebellum \
--to=sjenning@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nfont@linux.vnet.ibm.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