lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][GIT PULL][PATCH 0/10 -tip] cpu_debug patches 20090613
On Sun, Jun 14, 2009 at 12:27:42AM +0200, Thomas Gleixner wrote:
> On Sat, 13 Jun 2009, Jaswinder Singh Rajput wrote:
>
> > Please let me know how we can improve it and add more features so it
> > becomes more useful.

I second almost all of Thomas points. (The more I am wondering why
cpu_debug was merged at all.)

IMHO removing the cpuid, msr etc. stuff is the right thing to do.

But hey, I even can provide a "use case" for cpu_debug.

Recently I wanted to check some APIC registers. Instead of rebooting
the machine with apic=debug I loaded the module, mounted debugfs and
looked at the cpu_debug stuff to experience that ...

The registers that I was interested in were not provided.

So I had to add some code to print some of the regs in the extended
APIC register with apic=debug code. When submitting the patch
upstream I added the same regs to cpu_debug code. This really good
shows another weak point of cpu_debug:

If the kernel has already code for debugging output cpu_debug just
reinvents the wheel and does not even try to reuse existing code.

So in the end cpu_debug wasn't useful for me at all.

<snip>

> Dumping random information out of any context is not helping us to
> debug problems. There is no value to look at debug registers, context
> registers and tss->regs without the context of the task we look at.
>
> Can we please stop adding more random features to this?
>
> This needs to be done the other way round. First we need to remove all
> redundant and useless interfaces from cpu_debug and then think
> carefully about in which way we want to expose the few really missing
> interesting things either by extending existing user space tools or by
> providing context aware and debug relevant interfaces in the kernel.

IMHO the cpu_debug feature should be renamed to platform_debug and
then already existing kernel debug code could be modified such that it
can also be called from this new platform_debug facility. This would
allow to check certain things not only when booting Linux with certain
debug parameters but also on the fly when mounting the debugfs ...

The registers that come into my mind that would make some kind
of sense to provide with that interface are
- APIC stuff
- HPET stuff

Neither MSR, CPUID, CPU regs nor PCI config space stuff should be
added. Other facilities/tools exist for those (e.g. x86info,
msr-tools, pciutils or Magic SysRq).

... just my two cents.


Regards,

Andreas




\
 
 \ /
  Last update: 2009-06-15 16:01    [W:0.082 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site