linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Nathan Lynch <nathanl@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: ego@linux.vnet.ibm.com, mmc@linux.vnet.ibm.com, julietk@linux.ibm.com
Subject: Re: [PATCH] powerpc/rtas: retry when cpu offline races with suspend/migration
Date: Thu,  4 Jul 2019 00:27:04 +1000 (AEST)	[thread overview]
Message-ID: <45f3Ms0gcWz9sNf@ozlabs.org> (raw)
In-Reply-To: <20190621060518.29616-1-nathanl@linux.ibm.com>

On Fri, 2019-06-21 at 06:05:18 UTC, Nathan Lynch wrote:
> The protocol for suspending or migrating an LPAR requires all present
> processor threads to enter H_JOIN. So if we have threads offline, we
> have to temporarily bring them up. This can race with administrator
> actions such as SMT state changes. As of dfd718a2ed1f ("powerpc/rtas:
> Fix a potential race between CPU-Offline & Migration"),
> rtas_ibm_suspend_me() accounts for this, but errors out with -EBUSY
> for what almost certainly is a transient condition in any reasonable
> scenario.
> 
> Callers of rtas_ibm_suspend_me() already retry when -EAGAIN is
> returned, and it is typical during a migration for that to happen
> repeatedly for several minutes polling the H_VASI_STATE hcall result
> before proceeding to the next stage.
> 
> So return -EAGAIN instead of -EBUSY when this race is
> encountered. Additionally: logging this event is still appropriate but
> use pr_info instead of pr_err; and remove use of unlikely() while here
> as this is not a hot path at all.
> 
> Fixes: dfd718a2ed1f ("powerpc/rtas: Fix a potential race between CPU-Offline & Migration")
> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9fb603050ffd94f8127df99c699cca2f575eb6a0

cheers

      parent reply	other threads:[~2019-07-03 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  6:05 [PATCH] powerpc/rtas: retry when cpu offline races with suspend/migration Nathan Lynch
2019-06-24 16:52 ` mmc
2019-06-24 17:23   ` Nathan Lynch
2019-06-25  1:02     ` Juliet Kim
2019-06-25 18:51       ` Nathan Lynch
2019-06-26 21:40         ` Juliet Kim
2019-06-27  5:01           ` Michael Ellerman
2019-06-27 21:59             ` Juliet Kim
2019-07-01 22:12 ` Nathan Lynch
2019-07-02  2:16   ` Michael Ellerman
2019-07-03 14:27 ` Michael Ellerman [this message]

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=45f3Ms0gcWz9sNf@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=ego@linux.vnet.ibm.com \
    --cc=julietk@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mmc@linux.vnet.ibm.com \
    --cc=nathanl@linux.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).