[Crash-utility] [PATCH] Use only tasks on online CPUs for bt -a

Michael Holzheu holzheu at linux.vnet.ibm.com
Mon Apr 26 14:52:25 UTC 2010


Hello Dave,

On Mon, 2010-04-26 at 10:29 -0400, Dave Anderson wrote:
> I'd prefer not to leave them out of the various internal task arrays,
> especially the active_set[] array.  Regardless of their on/offline
> status, they do still exist as tasks, have runqueues, etc.

Ok, fine.

> If you're just worried about "bt -a", then why not just catch
> the offline status in the for loop inside "if (active)" section
> of cmd_bt()?

Good idea! The following attached patch also works for me.

Michael

---
 kernel.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/kernel.c
+++ b/kernel.c
@@ -1989,6 +1989,8 @@ cmd_bt(void)
 				free_all_bufs();
 				continue;
 			}
+			if (!(kt->cpu_flags[c] & ONLINE))
+				continue;
 			if ((tc = task_to_context(tt->panic_threads[c]))) {
 				pc->flags |= IN_FOREACH;
 				DO_TASK_BACKTRACE();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-5.0.3-bt-a-online.patch
Type: text/x-patch
Size: 331 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20100426/bda90f4e/attachment.bin>


More information about the Crash-utility mailing list