Skip to contentSkip to conversation

Enable kdump if 2nd-kernel is loaded.

PATCH In review Ken'ichi Ohmichi 2 participants 7 messages Jul 8, 2009 – Jul 9, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable kdump if 2nd-kernel is loaded.

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

Thanks
Ken'ichi Ohmichi

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw
Quoted 10 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

Quoted 17 lines

Thanks
Ken'ichi Ohmichi

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

Hi Simon,

Thank you for the comment.

Quoted 6 lines · Simon Horman
Quoted 5 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Quoted 7 lines
Quoted 4 lines

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

My patch does not make panic_on_oops effective when 2nd-kernel is loaded, and it makes a kdump effective.

kexec_should_crash() is called only by oops_end() for checking whether to call crash_kexec(). crash_kexec() is not panic, and I feel it is better that crash_kexec() is called when 2nd-kernel is loaded.

I tried to test a kdump on linux-2.6.31-rc1 *without* a kernel parameter "oops=panic" by echo c > /proc/sysrq-trigger, but a kdump did not work because a kdump, which is occurred by echo c > /proc/sysrq-trigger, has been changed to a NULL pointer error instead of calling crash_kexec() since linux-2.6.31-rc1. Then I tried to boot linux-2.6.31-rc1 *with* a kernel parameter "oops=panic", the kernel got a panic while kernel booting due to a problem other than a kdump.
So I think a kdump should be enabled when 2nd-kernel is loaded.

Thanks
Ken'ichi Ohmichi

Quoted 14 lines
Quoted 14 lines

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 10 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Acked-by
#3 lore raw
Quoted 28 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you for the comment.

Quoted 6 lines · Simon Horman
Quoted 5 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Quoted 7 lines
Quoted 4 lines

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

My patch does not make panic_on_oops effective when 2nd-kernel is loaded, and it makes a kdump effective.

kexec_should_crash() is called only by oops_end() for checking whether to call crash_kexec(). crash_kexec() is not panic, and I feel it is better that crash_kexec() is called when 2nd-kernel is loaded.

Quoted 8 lines

I tried to test a kdump on linux-2.6.31-rc1 *without* a kernel parameter "oops=panic" by echo c > /proc/sysrq-trigger, but a kdump did not work because a kdump, which is occurred by echo c > /proc/sysrq-trigger, has been changed to a NULL pointer error instead of calling crash_kexec() since linux-2.6.31-rc1. Then I tried to boot linux-2.6.31-rc1 *with* a kernel parameter "oops=panic", the kernel got a panic while kernel booting due to a problem other than a kdump.
So I think a kdump should be enabled when 2nd-kernel is loaded.

Hi,

thanks for the more detailed explanation. I've reconsidered my position and actually I think that I quite like your idea - it does indeed make sense for kdump to occur if a kdump kernel has been loaded.

Quoted 29 lines

Thanks
Ken'ichi Ohmichi

Quoted 14 lines
Quoted 14 lines

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 10 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw

Hi Simon,

Thank you so much for your review and comment.

I have one question.
Should I resend the patch to LKML with your "Acked-by:" tag for merging it ? Or isn't that necessary ?

Thanks
Ken'ichi Ohmichi

Quoted 35 lines · Simon Horman
Quoted 25 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you for the comment.

Quoted 6 lines · Simon Horman
Quoted 5 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Quoted 6 lines
Quoted 4 lines

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

My patch does not make panic_on_oops effective when 2nd-kernel is loaded, and it makes a kdump effective.

kexec_should_crash() is called only by oops_end() for checking whether to call crash_kexec(). crash_kexec() is not panic, and I feel it is better that crash_kexec() is called when 2nd-kernel is loaded.

Quoted 8 lines

I tried to test a kdump on linux-2.6.31-rc1 *without* a kernel parameter "oops=panic" by echo c > /proc/sysrq-trigger, but a kdump did not work because a kdump, which is occurred by echo c > /proc/sysrq-trigger, has been changed to a NULL pointer error instead of calling crash_kexec() since linux-2.6.31-rc1. Then I tried to boot linux-2.6.31-rc1 *with* a kernel parameter "oops=panic", the kernel got a panic while kernel booting due to a problem other than a kdump.
So I think a kdump should be enabled when 2nd-kernel is loaded.

Quoted 40 lines

Hi,

thanks for the more detailed explanation. I've reconsidered my position and actually I think that I quite like your idea - it does indeed make sense for kdump to occur if a kdump kernel has been loaded.

Quoted 31 lines

Thanks
Ken'ichi Ohmichi

Quoted 14 lines
Quoted 14 lines

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 9 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
Quoted 8 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you so much for your review and comment.

I have one question.
Should I resend the patch to LKML with your "Acked-by:" tag for merging it ? Or isn't that necessary ?

I think sending it to LKML with the acked-by would be a good idea.

Quoted 81 lines

Thanks
Ken'ichi Ohmichi

Quoted 75 lines · Simon Horman
Quoted 25 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you for the comment.

Quoted 6 lines · Simon Horman
Quoted 5 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Quoted 6 lines
Quoted 4 lines

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

My patch does not make panic_on_oops effective when 2nd-kernel is loaded, and it makes a kdump effective.

kexec_should_crash() is called only by oops_end() for checking whether to call crash_kexec(). crash_kexec() is not panic, and I feel it is better that crash_kexec() is called when 2nd-kernel is loaded.

Quoted 8 lines

I tried to test a kdump on linux-2.6.31-rc1 *without* a kernel parameter "oops=panic" by echo c > /proc/sysrq-trigger, but a kdump did not work because a kdump, which is occurred by echo c > /proc/sysrq-trigger, has been changed to a NULL pointer error instead of calling crash_kexec() since linux-2.6.31-rc1. Then I tried to boot linux-2.6.31-rc1 *with* a kernel parameter "oops=panic", the kernel got a panic while kernel booting due to a problem other than a kdump.
So I think a kdump should be enabled when 2nd-kernel is loaded.

Hi,

thanks for the more detailed explanation. I've reconsidered my position and actually I think that I quite like your idea - it does indeed make sense for kdump to occur if a kdump kernel has been loaded.

Quoted 31 lines

Thanks
Ken'ichi Ohmichi

Quoted 14 lines
Quoted 14 lines

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 9 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw

Hi Simon,

Quoted 10 lines · Simon Horman
Quoted 7 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you so much for your review and comment.

I have one question.
Should I resend the patch to LKML with your "Acked-by:" tag for merging it ? Or isn't that necessary ?

I think sending it to LKML with the acked-by would be a good idea.

OK, I will do it.

Thanks
Ken'ichi Ohmichi

Quoted 74 lines
Quoted 69 lines
Quoted 68 lines · Simon Horman
Quoted 25 lines · Ken'ichi Ohmichi

Hi Simon,

Thank you for the comment.

Quoted 6 lines · Simon Horman
Quoted 5 lines · Ken'ichi Ohmichi

Hi,

This patch enables a kdump if 2nd-kernel is loaded. (The patch is based on linux-2.6.31-rc2.)

Quoted 6 lines
Quoted 4 lines

Now, a kdump is enabled if a kernel parameter "oops=panic" is specified and 2nd-kernel is loaded. I think that a kdump should be enabled regardless of "oops=panic" if 2nd-kernel is loaded, because a system administrator loads 2nd-kernel for enabling a kdump.

I'm not sure that I like this change. To my mind, panic on oops should only occur if specifically requested.

My patch does not make panic_on_oops effective when 2nd-kernel is loaded, and it makes a kdump effective.

kexec_should_crash() is called only by oops_end() for checking whether to call crash_kexec(). crash_kexec() is not panic, and I feel it is better that crash_kexec() is called when 2nd-kernel is loaded.

Quoted 8 lines

I tried to test a kdump on linux-2.6.31-rc1 *without* a kernel parameter "oops=panic" by echo c > /proc/sysrq-trigger, but a kdump did not work because a kdump, which is occurred by echo c > /proc/sysrq-trigger, has been changed to a NULL pointer error instead of calling crash_kexec() since linux-2.6.31-rc1. Then I tried to boot linux-2.6.31-rc1 *with* a kernel parameter "oops=panic", the kernel got a panic while kernel booting due to a problem other than a kdump.
So I think a kdump should be enabled when 2nd-kernel is loaded.

Hi,

thanks for the more detailed explanation. I've reconsidered my position and actually I think that I quite like your idea - it does indeed make sense for kdump to occur if a kdump kernel has been loaded.

Quoted 26 lines

Thanks
Ken'ichi Ohmichi

Quoted 23 lines
Quoted 14 lines

---

kernel/kexec.c +2 -0
@@ -57,6 +57,8 @@ struct resource crashk_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+	if (kexec_crash_image)
+		return 1;
 	if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
 		return 1;
 	return 0;
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Quoted 5 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec