public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Cyril Bur <cyrilbur@gmail•com>
Cc: linuxppc-dev@lists•ozlabs.org,
	Tyrel Datwyler <tyreld@linux•vnet.ibm.com>,
	Nathan Fontenot <nfont@linux•vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc/pseries: Simplify check for suspendability during suspend/migration
Date: Wed, 25 Mar 2015 12:55:36 +1100	[thread overview]
Message-ID: <1427248536.29319.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1427158353.8284.12.camel@cyril>

On Tue, 2015-03-24 at 11:52 +1100, Cyril Bur wrote:
> On Wed, 2015-03-04 at 12:22 -0800, Tyrel Datwyler wrote:
> > During suspend/migration operation we must wait for the VASI state reported
> > by the hypervisor to become Suspending prior to making the ibm,suspend-me
> > RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable
> > that exposes the VASI state to the caller. This is unnecessary as the caller
> > only really cares about the following three conditions; if there is an error
> > we should bailout, success indicating we have suspended and woken back up so
> > proceed to device tree updated, or we are not suspendable yet so try calling
> > rtas_ibm_suspend_me again shortly.
> > 
> > This patch removes the extraneous vasi_state variable and simply uses the
> > return code to communicate how to proceed. We either succeed, fail, or get
> > -EAGAIN in which case we sleep for a second before trying to call
> > rtas_ibm_suspend_me again.
> > 
> Hi Tyrel, sorry this fell off my radar. Thanks for addressing all those
> issues.
> 
> > Signed-off-by: Tyrel Datwyler <tyreld@linux•vnet.ibm.com>
> > Cc: Nathan Fontenot <nfont@linux•vnet.ibm.com>
> > Cc: Cyril Bur <cyrilbur@gmail•com>
> > ---
> > 
> > Changes in v2:
> > - Addressed Cyril's comments as follow:
> > - Removed unused vasi_rc variable
> > - Kept return behavior of ppc_rtas the same in the case of VASI error
> 
> Looks good for ppc_rtas(). Still changing a return value (pointed out
> below) in migrate_store(), we might be ok with that since its the sysfs
> file but mentioning it in the commit message would be a good idea.

Yeah I think that's fine.

> When rtas_ibm_suspend me() now returns -EIO, migrate_store() will now
> return -EIO. It used to return -1.

-1 is EPERM which is wrong, so -EIO is better at least.

Tyrel can you please resend with an updated changelog that documents that
change.

cheers

  reply	other threads:[~2015-03-25  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 20:22 [PATCH v2] powerpc/pseries: Simplify check for suspendability during suspend/migration Tyrel Datwyler
2015-03-23 20:22 ` Tyrel Datwyler
2015-03-24  0:52 ` Cyril Bur
2015-03-25  1:55   ` Michael Ellerman [this message]
2015-03-27 19:47     ` [PATCH v3 1/2] " Tyrel Datwyler

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=1427248536.29319.4.camel@ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=cyrilbur@gmail$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=nfont@linux$(echo .)vnet.ibm.com \
    --cc=tyreld@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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