From: Jason Wessel <jason.wessel@windriver.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net, mingo@elte.hu,
mort@sgi.com, linux-arch@vger.kernel.org
Subject: Re: [PATCH 05/37] kdb: core for kgdb back end
Date: Mon, 28 Dec 2009 11:15:00 -0600 [thread overview]
Message-ID: <4B38E794.7000204@windriver.com> (raw)
In-Reply-To: <1262019353.7135.127.camel@laptop>
Peter Zijlstra wrote:
> On Mon, 2009-12-28 at 10:33 -0600, Jason Wessel wrote:
>> The reason we need the attached patch is to be able to call
>> curr_task() for kdb to perform some basic per cpu task analysis while
>> the system is stopped.
>
> Right, so this set_curr_task() thing is way scary, maybe we can simplify
> things to only expose curr_task()?
I am not sure what you had in mind for a simplification. Is it simply to only expose the function to kdb that we use, as follows in the patch below, or something else?
There are no calls to set_curr_task() from kdb. The curr_task() was only needed because there was no way to get at cpu_curr() outside of kernel/sched.c. I had just assumed curr_task() was the "official" helper function.
Jason.
diff --git a/kernel/sched.c b/kernel/sched.c
index c535cc4..76fa8e1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -9784,9 +9784,9 @@ void normalize_rt_tasks(void)
#endif /* CONFIG_MAGIC_SYSRQ */
-#ifdef CONFIG_IA64
+#if defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB)
/*
- * These functions are only useful for the IA64 MCA handling.
+ * These functions are only useful for the IA64 MCA handling, or kdb.
*
* They can only be called when the whole system has been
* stopped - every CPU needs to be quiescent, and no scheduling
@@ -9806,6 +9806,9 @@ struct task_struct *curr_task(int cpu)
return cpu_curr(cpu);
}
+#endif /* defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB) */
+
+#ifdef CONFIG_IA64
/**
* set_curr_task - set the current task for a given cpu.
* @cpu: the processor in question.
prev parent reply other threads:[~2009-12-28 17:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1261603190-5036-1-git-send-email-jason.wessel@windriver.com>
[not found] ` <1261603190-5036-2-git-send-email-jason.wessel@windriver.com>
[not found] ` <1261603190-5036-3-git-send-email-jason.wessel@windriver.com>
[not found] ` <1261603190-5036-4-git-send-email-jason.wessel@windriver.com>
[not found] ` <1261603190-5036-5-git-send-email-jason.wessel@windriver.com>
2009-12-23 21:19 ` [PATCH 05/37] kdb: core for kgdb back end Jason Wessel
2009-12-24 1:28 ` Andi Kleen
2009-12-28 22:36 ` Jason Wessel
2009-12-28 23:37 ` Andi Kleen
2009-12-24 11:01 ` Peter Zijlstra
2009-12-24 11:16 ` Peter Zijlstra
2009-12-24 15:57 ` Jason Wessel
2009-12-26 21:34 ` Mike Frysinger
2009-12-24 11:55 ` Jason Wessel
2009-12-24 11:55 ` Jason Wessel
2009-12-24 12:01 ` Peter Zijlstra
2009-12-24 11:04 ` Peter Zijlstra
2009-12-28 16:33 ` Jason Wessel
2009-12-28 16:55 ` Peter Zijlstra
2009-12-28 17:15 ` Jason Wessel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B38E794.7000204@windriver.com \
--to=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mort@sgi.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).