From: Samuel Mendoza-Jonas <hidden> Date: 2015-07-22 05:55:01
Always include a timeout when waiting for secondary cpus to enter OPAL
in the kexec path, rather than only when crashing.
Signed-off-by: Samuel Mendoza-Jonas <redacted>
---
arch/powerpc/platforms/powernv/setup.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
@@ -212,6 +212,18 @@ static void pnv_kexec_wait_secondaries_down(void)i,paca[i].hw_cpu_id);notified=i;}++/*+*Oncrashsecondariesmightbeunreachableorhung,+*sotimeoutifwe'vewaitedtoolong+**/+mdelay(1);+if(timeout--==0){+printk(KERN_ERR"kexec: timed out waiting for "+"cpu %d (physical %d) to enter OPAL\n",+i,paca[i].hw_cpu_id);+break;+}}}}
@@ -233,13 +245,6 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)/* Return the CPU to OPAL */opal_return_cpu();-}elseif(crash_shutdown){-/*-*Oncrash,wedon'twaitforsecondariestogo-*downastheymightbeunreachableorhung,so-*insteadwejustwaitabitandmoveon.-*/-mdelay(1);}else{/* Primary waits for the secondaries to have reached OPAL */pnv_kexec_wait_secondaries_down();
From: Stewart Smith <hidden> Date: 2015-07-27 05:56:28
Samuel Mendoza-Jonas [off-list ref] writes:
Always include a timeout when waiting for secondary cpus to enter OPAL
in the kexec path, rather than only when crashing.
This *sounds* reasonable... but I wonder what actual worse case could
be and why we'd get stuck too long waiting for things?
What was the original bug/problem that inspired this patch?
and is 1s enough?
From: Samuel Mendoza-Jonas <hidden> Date: 2015-07-28 06:13:53
On 27/07/15 15:56, Stewart Smith wrote:
Samuel Mendoza-Jonas [off-list ref] writes:
quoted
Always include a timeout when waiting for secondary cpus to enter OPAL
in the kexec path, rather than only when crashing.
This *sounds* reasonable... but I wonder what actual worse case could
be and why we'd get stuck too long waiting for things?
What was the original bug/problem that inspired this patch?
and is 1s enough?
"It sounds reasonable" was more or less the inspiration :)
While I was going over some of the code relating to the previous kexec
fix with Ben he pointed this out and suggested there wasn't
much of a reason to differentiate between a crashing/non-crashing
cpu as far as the timeout goes - if we're not 'crashing' we still
don't want to spin forever.
I'll let Ben comment on whether 1s per cpu is enough.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2015-07-28 09:58:35
On Tue, 2015-07-28 at 16:13 +1000, Samuel Mendoza-Jonas wrote:
"It sounds reasonable" was more or less the inspiration :)
While I was going over some of the code relating to the previous kexec
fix with Ben he pointed this out and suggested there wasn't
much of a reason to differentiate between a crashing/non-crashing
cpu as far as the timeout goes - if we're not 'crashing' we still
don't want to spin forever.
I'll let Ben comment on whether 1s per cpu is enough.
Well, if the scheduler doesn't give us the CPU at the point of kexec
within a second, I think we are in pretty bad shape already, don't you
think ?
I don't mind bumping the timeout of you have worries...
Cheers,
Ben.
From: Stewart Smith <hidden> Date: 2015-07-29 07:24:52
Benjamin Herrenschmidt [off-list ref] writes:
On Tue, 2015-07-28 at 16:13 +1000, Samuel Mendoza-Jonas wrote:
quoted
"It sounds reasonable" was more or less the inspiration :)
While I was going over some of the code relating to the previous kexec
fix with Ben he pointed this out and suggested there wasn't
much of a reason to differentiate between a crashing/non-crashing
cpu as far as the timeout goes - if we're not 'crashing' we still
don't want to spin forever.
I'll let Ben comment on whether 1s per cpu is enough.
Well, if the scheduler doesn't give us the CPU at the point of kexec
within a second, I think we are in pretty bad shape already, don't you
think ?
Quite likely, I think my dislike of magic timeouts just kicked in :)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-10-12 11:21:24
On Wed, 2015-22-07 at 05:54:29 UTC, Samuel Mendoza-Jonas wrote:
Always include a timeout when waiting for secondary cpus to enter OPAL
in the kexec path, rather than only when crashing.
Signed-off-by: Samuel Mendoza-Jonas <redacted>