lkml.org 
[lkml]   [2008]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [git pull] kgdb-light -v10
    On Tue, Feb 12, 2008 at 10:20:10AM -0800, Andrew Morton wrote:
    > On Tue, 12 Feb 2008 19:20:24 +0100 Andi Kleen <andi@firstfloor.org> wrote:
    >
    > > > - the kgdb commands should always act on the *current* CPU only
    > > > - add one command that says "switch over to CPU #n" which just releases
    > > > the current CPU and sends an IPI to that CPU #n (no timeouts, no
    > > > synchronous waiting, no nothing - it's like a "continue", but with a
    > > > "try to get the other CPU to stop"
    > >
    > > The problem I see here is that the kernel tends to get badly confused
    > > if one CPU just stops responding. At some point someone does an global
    > > IPI and that then hangs.
    >
    > Yes. A stopped CPU is very visible and hence can change the behaviour of
    > the system which is being tested.
    >
    > > You would need to hotunplug the CPU which
    > > is theoretically possible, but quite intrusive. Or maybe the "isolate CPUs
    > > in cpusets" frame work someone posted recently on l-k could be used. Still
    > > would probably have all kinds of tricky issues and races.
    >
    > I don't think you'd want to be poking around in kernel internals while some
    > of the CPUs are continuing to run. It sounds rather creepy. You want
    > everything to stop. Including time-related things.

    Note I wrote the one above only as a reply to Linus' proposal, not
    because I was advocating "live debugging" (or rather I think if you want
    that just use gdb vmlinux /proc/kcore)

    I agree with you in principle, but what do you do if one of the CPUs doesn't
    answer?

    Ingo seems to think it's ok for the debugger then to just hang too,
    I think it should eventually time out and debug anyways.

    Also there are some limits on how much the system should be frozen
    down. For example if you're strict about this requirement you
    would need to require full DMA quiescence (like kexec does). But that's
    obvious not a good idea for the debugger. So it's always shades
    of gray, not black/white.

    What I find strange with the current patch is that it goes to extreme
    measures to stop the CPUs (will hang forever), but not do the whole
    thing (DMA quiescence too)

    -Andi



    \
     
     \ /
      Last update: 2008-02-12 19:43    [W:0.025 / U:59.884 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site