linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] Correct cpu affinity for dlpar added cpus
Date: Wed, 29 Apr 2015 14:53:27 +1000	[thread overview]
Message-ID: <1430283207.12906.1.camel@ellerman.id.au> (raw)
In-Reply-To: <553FA94D.2000608@linux.vnet.ibm.com>

Subject should be "powerpc/pseries: ..." please.

On Tue, 2015-04-28 at 10:37 -0500, Nathan Fontenot wrote:
> The incorrect ordering of operations during cpu dlpar causes the affinity
> of cpus being added to be invalid. Phyp does not assign affinity information
> for a cpu until the rtas set-indicator calls are made to set the isolation
> and allocation state. In the current code we call rtas configure-connector
> before making the set-indicator calls which results in invalid data in the
> ibm,associativity property for the cpu we're adding.

Invalid and benign? Or invalid and causes an oops or ..?

> This patch corrects the order of operations to make the set-indicator
> calls (done in acquire_drc) before calling configure-connector.

Which commit added the code and/or caused it to be wrong?

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n187


While looking at the code I notice it looks like we leak a reference if
dlpar_configure_connector() fails:

	parent = of_find_node_by_path("/cpus");
	if (!parent)
		return -ENODEV;

	dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent);
	if (!dn)
		return -EINVAL;

	of_node_put(parent);


Please send a separate patch to fix that.

cheers

  reply	other threads:[~2015-04-29  4:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 15:37 [PATCH] Correct cpu affinity for dlpar added cpus Nathan Fontenot
2015-04-29  4:53 ` Michael Ellerman [this message]
2015-04-29 15:33   ` 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=1430283207.12906.1.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --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;
as well as URLs for NNTP newsgroup(s).