[PATCH v2] powerpc/pseries: Simplify check for suspendability during suspend/migration

Michael Ellerman mpe at ellerman.id.au
Wed Mar 25 12:55:36 AEDT 2015


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 at linux.vnet.ibm.com>
> > Cc: Nathan Fontenot <nfont at linux.vnet.ibm.com>
> > Cc: Cyril Bur <cyrilbur at 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




More information about the Linuxppc-dev mailing list