On Tue, 12 Feb 2008, Ingo Molnar wrote:Quite frankly, I don't see why the kernel kgdb layer should have *any* code like this at all. The one who is actually debugging is the one who should decide which CPU's get stopped, and which don't. I realize that the gdb remote protocol is probably a piece of crap and cannot handle that, but hey, that's not my problem, and more importantly, I don't think it's even a *remotely* valid reason for making bad decisions in the kernel. gdb was still open source last time I saw, and I think it's reasonable to just say: - 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" Yes, other CPU's will obviously often end up stopping due to waiting for some spinlock or other if we stop one, but that's a separate issue, and quite often it might be sufficient - and what we want. And yes, you'd likely have to add some support to gdb to make this _usable_, but now all that usability crap, all those timeouts for "stop all CPU's" are now in user space on the _debugger_ side. That can be as fancy as it wants to be. And maybe this isn't realistic. I'm not saying "we _must_ do it this way", I just want to say that the kernel kgdb layer should be as thin ass humanly possible, and maybe the right thing to do is to simply totally punt on the whole "stop other cpu's" issue and make it a debugger-side question. In other words, is it perhaps possible to just *get*rid*of* that "kgdb_active" and "nmicallback" and the whole multi-CPU roundup? Just use a kgdb spinlock around the stuff that actually sends and receives individual packets, and expect the debugger side to sort them out (yeah, I suspect this involves having to add the CPU ID to each packet). Linus --
| Peter Zijlstra | [PATCH 6/6] sched: disabled rt-bandwidth by default |
| Alan Cox | Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops |
| Vegard Nossum | [RFC][PATCH] bitfields API |
| Pallipadi, Venkatesh | RE: 2.6.21-rc6-mm1 |
git: | |
| Jan Holesovsky | [PATCH] RFC: git lazy clone proof-of-concept |
| Junio C Hamano | Re: [PATCH resend] make "git push" update origin and mirrors, "git push --mirror" ... |
| Nicolas Pitre | Re: [PATCH] diff-delta: produce optimal pack data |
| Sam Vilain | [PATCH] git-mergetool: add support for ediff |
| Michael | QEMU /dev/tun issue with tun device number > 3 (more than 4 guests) |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Predrag Punosevac | Re: OpenBSD project goals |
| Nick Guenther | Re: how to clear dmesg outpout |
| Stephen Pierce | SLS |
| C Wayne Huling | Re: Can males come from... |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
| David Willmore | Re: Intel, the Pentium and Linux |
