* [Patch] common/kexec: Identify which cpu the kexec image is being executed on.
@ 2014-01-06 11:59 Andrew Cooper
2014-01-06 17:39 ` David Vrabel
2014-01-07 14:29 ` Jan Beulich
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cooper @ 2014-01-06 11:59 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Keir Fraser, David Vrabel, Jan Beulich
A patch to this effect has been in XenServer for a little while, and has
proved to be a useful debugging point for servers which have different
behaviours depending when crashing on the non-bootstrap processor.
Moving the printk() from kexec_panic() to one_cpu_only() means that it will
not be printed multiple times in the case of multiple cpus racing on the kexec
path.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: David Vrabel <david.vrabel@citrix.com>
---
I would like this to be considered for 4.4, given that it is a quite trivial
change, yet very useful information in the case of a crash.
---
xen/common/kexec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 481b0c2..5dcd487 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -265,6 +265,8 @@ static int noinline one_cpu_only(void)
}
set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
+ printk("Executing crash image on cpu%u\n", cpu);
+
return 0;
}
@@ -340,8 +342,6 @@ void kexec_crash(void)
if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) )
return;
- printk("Executing crash image\n");
-
kexecing = TRUE;
if ( kexec_common_shutdown() != 0 )
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch] common/kexec: Identify which cpu the kexec image is being executed on.
2014-01-06 11:59 [Patch] common/kexec: Identify which cpu the kexec image is being executed on Andrew Cooper
@ 2014-01-06 17:39 ` David Vrabel
2014-01-07 14:29 ` Jan Beulich
1 sibling, 0 replies; 4+ messages in thread
From: David Vrabel @ 2014-01-06 17:39 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Keir Fraser, David Vrabel, Jan Beulich, Xen-devel
On 06/01/14 11:59, Andrew Cooper wrote:
> A patch to this effect has been in XenServer for a little while, and has
> proved to be a useful debugging point for servers which have different
> behaviours depending when crashing on the non-bootstrap processor.
>
> Moving the printk() from kexec_panic() to one_cpu_only() means that it will
> not be printed multiple times in the case of multiple cpus racing on the kexec
> path.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Keir Fraser <keir@xen.org>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: David Vrabel <david.vrabel@citrix.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
One for 4.5 I think.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] common/kexec: Identify which cpu the kexec image is being executed on.
2014-01-06 11:59 [Patch] common/kexec: Identify which cpu the kexec image is being executed on Andrew Cooper
2014-01-06 17:39 ` David Vrabel
@ 2014-01-07 14:29 ` Jan Beulich
2014-01-08 13:20 ` David Vrabel
1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2014-01-07 14:29 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Keir Fraser, David Vrabel, Xen-devel
>>> On 06.01.14 at 12:59, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> --- a/xen/common/kexec.c
> +++ b/xen/common/kexec.c
> @@ -265,6 +265,8 @@ static int noinline one_cpu_only(void)
> }
>
> set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
> + printk("Executing crash image on cpu%u\n", cpu);
> +
> return 0;
> }
>
With the calling function also being used from kexec_reboot(),
printing "crash image" here isn't really correct afaict.
Jan
> @@ -340,8 +342,6 @@ void kexec_crash(void)
> if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) )
> return;
>
> - printk("Executing crash image\n");
> -
> kexecing = TRUE;
>
> if ( kexec_common_shutdown() != 0 )
> --
> 1.7.10.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] common/kexec: Identify which cpu the kexec image is being executed on.
2014-01-07 14:29 ` Jan Beulich
@ 2014-01-08 13:20 ` David Vrabel
0 siblings, 0 replies; 4+ messages in thread
From: David Vrabel @ 2014-01-08 13:20 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, Xen-devel
On 07/01/14 14:29, Jan Beulich wrote:
>>>> On 06.01.14 at 12:59, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/common/kexec.c
>> +++ b/xen/common/kexec.c
>> @@ -265,6 +265,8 @@ static int noinline one_cpu_only(void)
>> }
>>
>> set_bit(KEXEC_FLAG_IN_PROGRESS, &kexec_flags);
>> + printk("Executing crash image on cpu%u\n", cpu);
>> +
>> return 0;
>> }
>>
>
> With the calling function also being used from kexec_reboot(),
> printing "crash image" here isn't really correct afaict.
Good point.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-08 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 11:59 [Patch] common/kexec: Identify which cpu the kexec image is being executed on Andrew Cooper
2014-01-06 17:39 ` David Vrabel
2014-01-07 14:29 ` Jan Beulich
2014-01-08 13:20 ` David Vrabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.