From: Ingo Molnar <mingo@elte.hu>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net, kdb@oss.sgi.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 01/13] RFC ONLY - kdb: core for kgdb back end
Date: Sat, 9 May 2009 06:09:42 +0200 [thread overview]
Message-ID: <20090509040942.GB8007@elte.hu> (raw)
In-Reply-To: <1241817800-9320-2-git-send-email-jason.wessel@windriver.com>
* Jason Wessel <jason.wessel@windriver.com> wrote:
> This is an RFC patch. This work is by no means in its final form,
> nor is it in a form that would be suitible for upstream merging.
> This is an early prototype of a kdb frontend talking to a kgdb
> backend. It is meant to foster some discussion around the
> usefulness of merging kdb and kgdb together, as well as experiment
> with changes to kgdb's core to improve robustness and
> functionality.
>
> This patch contains the kdb core and some instrumentation into the
> core kernel which kdb requires in order to gather information for
> some of its reporting functions.
Just a first quick 30-seconds impression from skimming through the
patch:
- The cleanups are an absolute must before doing any in-depth
review. We only want to waste valuable review bandwidth on code
that at least _looks_ nice and tidy.
- Many functions are way too large, with many indentation levels -
they need a split-up.
- Most of the code patterns dont match core kernel standards and
practices, so it's not reviewable in detail. It needs a
thorough clean-up not just on the surface, but on the algorithmic
level as well.
bits like:
> + // HACK HACK HACK
> + printk(KERN_CRIT "DOH NEED TO IMPLEMENT THIS!");
need fixed.
Locking needs reviewed and fixed:
> +/* Locking is awkward. The debug code is called from all contexts, including
> + * non maskable interrupts. A normal spinlock is not safe in NMI context. Try
> + * to get the debug allocator lock, if it cannot be obtained after a second
> + * then give up. If the lock could not be previously obtained on this cpu then
> + * only try once.
> + *
> + * sparse has no annotation for "this function _sometimes_ acquires a lock", so
> + * fudge the acquire/release notation.
> + */
Plus, if _any_ debugger front-end is considered for merging, it
_must_ work with Kernel Mode Setting properly, out of X. No ifs
and when.
Also, high-level file organization: i'd suggest to move it all under
the kernel/debug/ hierarchy, and move kernel/kgdb.c to
kernel/debug/backend/core.c or so [possibly split up a bit, it's
getting quite large] and the KDB bits under kernel/debug/frontend/.
We dont want multiple back-ends nor multiple front-ends. We want one
good back-end and one good (built-in) front-end.
I supported and helped a debugging backend and i dont consider a
front-end completely impossible either. But it will have to meet a
_lot_ of stringent standards because a good kernel debugging
front-end's cross section to the system is even larger than a
backend's. It's a tough job to get this done.
Ingo
next prev parent reply other threads:[~2009-05-09 4:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 21:23 [PATCH 0/13] RFC ONLY - kdb for kgdb Jason Wessel
2009-05-08 21:23 ` [PATCH 01/13] RFC ONLY - kdb: core for kgdb back end Jason Wessel
2009-05-08 21:23 ` [PATCH 02/13] RFC ONLY - kgdb: core changes to support kdb Jason Wessel
2009-05-08 21:23 ` [PATCH 03/13] RFC ONLY - kgdb,8250,pl011: Return immediately from console poll Jason Wessel
2009-05-08 21:23 ` [PATCH 04/13] RFC ONLY - kgdb: gdb "monitor" -> kdb passthrough Jason Wessel
2009-05-08 21:23 ` [PATCH 05/13] RFC ONLY - kgdboc,keyboard: Keyboard driver for kdb with kgdb Jason Wessel
2009-05-08 21:23 ` [PATCH 06/13] kgdb: remove post_primary_code references Jason Wessel
2009-05-08 21:23 ` [PATCH 07/13] RFC ONLY - x86,kgdb: Add low level debug hook Jason Wessel
2009-05-08 21:23 ` [PATCH 08/13] RFC ONLY - arm,kgdb: Add hook to catch an oops with debugger Jason Wessel
2009-05-08 21:23 ` [PATCH 09/13] RFC ONLY - powerpc,kgdb: Introduce low level trap catching Jason Wessel
2009-05-08 21:23 ` [PATCH 10/13] RFC ONLY - mips,kgdb: kdb low level trap catch and stack trace Jason Wessel
2009-05-08 21:23 ` [PATCH 11/13] kgdb: Add the ability to schedule a breakpoint via a tasklet Jason Wessel
2009-05-08 21:23 ` [PATCH 12/13] RFC ONLY - kgdb,kdb: use async breakpoint for sysrq for usb Jason Wessel
2009-05-08 21:23 ` [PATCH 13/13] RFC ONLY - usb,keyboard: uchi, echi, and ochi polling keyboard urbs Jason Wessel
2009-05-09 4:09 ` Ingo Molnar [this message]
2009-05-19 18:22 ` [PATCH 01/13] RFC ONLY - kdb: core for kgdb back end Jason Wessel
2009-05-08 21:49 ` [PATCH 0/13] RFC ONLY - kdb for kgdb Maxim Levitsky
2009-05-11 9:15 ` Louis Rilling
2009-05-11 9:23 ` Christoph Hellwig
2009-05-11 9:51 ` Louis Rilling
2009-05-11 9:22 ` [kdb] " Christoph Hellwig
2009-05-11 12:57 ` Martin Hicks
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=20090509040942.GB8007@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=jason.wessel@windriver.com \
--cc=kdb@oss.sgi.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®