From kaos@sgi.com Tue Oct 10 00:52:34 2006 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Oct 2006 00:52:38 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id k9A7qTaG015594 for ; Tue, 10 Oct 2006 00:52:32 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA19335 for ; Tue, 10 Oct 2006 17:51:47 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 9EACA1D4E5; Tue, 10 Oct 2006 17:51:47 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 70C5A81ED8 for ; Tue, 10 Oct 2006 17:51:47 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 From: Keith Owens To: kdb@oss.sgi.com Subject: KDB changes that will occur in 2.6.19-rc2 Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 10 Oct 2006 17:51:47 +1000 Message-ID: <1289.1160466707@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 1188 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb There are some big changes in the current kernel git tree that will appear in 2.6.19-rc2. The git kernel no longer passes struct pt_regs around, instead there is a get_irq_regs() function to obtain the registers as of the last interrupt. If you have any code that passes struct pt_regs then expect to spend some time fixing it on 2.6.19-rc2. KDB passes pt_regs all over the place and will require lots of little changes. I will take care of the main KDB patch, but if you maintain any KDB patches yourself then you will have to remove struct pt_regs from the parameter lists in your code. Since this change affects a lot of the KDB functions, I will take this opportunity to also remove the environment pointer from the KDB functions. Only a couple of KDB internal functions actually need envp and they can get the data from a global structure. Passing envp to various functions is something I inherited from the previous KDB maintainer and I was unwilling to remove it because it would break external KDB patches. But since the pt_regs removal must be done anyway, removing envp is not much extra pain. For example, before 2.6.19-rc2: static int kdb_ps(int argc, const char **argv, const char **envp, struct pt_regs *regs) 2.6.19-rc2 and later: static int kdb_ps(int argc, const char **argv) --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Fri Oct 13 06:35:32 2006 Received: with ECARTIS (v1.0.0; list kdb); Fri, 13 Oct 2006 06:35:41 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id k9DDZNaG010340 for ; Fri, 13 Oct 2006 06:35:26 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA27682 for ; Fri, 13 Oct 2006 23:34:40 +1000 Received: from ocs3.ocs.com.au (ocs3w.ocs.com.au [192.168.254.3]) by mail.ocs.com.au (Postfix) with ESMTP id 1E162E0B209; Fri, 13 Oct 2006 23:23:13 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 6B42FF67; Fri, 13 Oct 2006 23:23:35 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 5B03181EE7; Fri, 13 Oct 2006 23:23:35 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 From: Keith Owens To: linux-arch@vger.kernel.org cc: kdb@oss.sgi.com, fastboot@lists.osdl.org, lkcd-devel.lists.sourceforge.net@ocs.com.au, info@linsyssoft.com, "Jan Beulich" , James.Bottomley@HansenPartnership.com, linux-visws-devel@lists.sf.ne Reply-To: linux-arch@vger.kernel.org Subject: [RFC] Common API for bring the system to a crash_stop state Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 13 Oct 2006 23:23:35 +1000 Message-ID: <26656.1160745815@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1189 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb This initial mail is going to a wide distribution because there are several different people and groups who are working on kernel debug style tools. These tools include debuggers such as kdb, kgdb, nlkd. There are also kernel dump tools like netdump, lkcd, crash, kexec/kdump and others. To cut down the cross list noise, I have arbitrarily designated linux-arch@vger.kernel.org as the only list to receive and discuss the patches that follow this initial mail. Reply-To is set to linux-arch@vger.kernel.org, please honour it and trim the rest of the cc: list. ------------------------------------------------------------------------------------- All the kernel debug style tools (kdb, kgdb, nlkd, netdump, lkcd, crash, kdump etc.) have a common requirement, they need to do a crash stop of the systems. This means stopping all the cpus, even if some of the cpus are spinning disabled. In addition, each cpu has to save enough state to start diagnosis of the problem. * Each debug style tool has written its own code for interrupting the other cpus and for saving cpu state. * Some tools try a normal IPI first then send a non-maskable interrupt after a delay. * Some tools always send a NMI first, which can result in incomplete machine state if it arrives at the wrong time. * Most of the tools do not know how to cope with the IA64 architecture defined rendezvous algorithm, which interferes with an OS driven rendezvous. * Needless to say, every single patch set conflicts with all the others, which makes it very difficult to install more than one of the tools at a time. The solution is to define a common crash_stop API that can be used by _all_ of the debug style tools, without reinventing the wheel each time. The following crash_stop patches will only appear on linux-arch. crash_stop_headers The common and i386 crash_stop.h files crash_stop_i386_handler Add the crash_stop i386 interrupt handlers. This patch changes existing i386 files. It needs testing on visw and updating for voyager. crash_stop_i386 I386 specific crash_stop code. crash_stop_common Architecture independent crash_stop code. crash_stop_common_Kconfig Kconfig change to activate crash_stop. crash_stop_demo A demo module to test crash_stop(). This is a work in progress, it does most of the job on i386. x86_64 will be easy once i386 is working. I have an incomplete patch for ia64, coexxisting with the MCA/INIT rendezvous algorithm is non-trivial. At the moment, I am more interested in feedback on the design of the API, to ensure that it suits everybody's requirements. Most of the design documentation is in the crash_stop_common patch. Please read that before replying. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Oct 23 20:37:05 2006 Received: with ECARTIS (v1.0.0; list kdb); Mon, 23 Oct 2006 20:37:09 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id k9O3b1aG016458 for ; Mon, 23 Oct 2006 20:37:04 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA23357 for ; Tue, 24 Oct 2006 13:36:17 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id B0F822F67; Tue, 24 Oct 2006 13:36:17 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 8570781EDD for ; Tue, 24 Oct 2006 13:36:17 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 From: Keith Owens To: kdb@oss.sgi.com Subject: Update KDB to 2.6.19-rc2 Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 24 Oct 2006 13:36:17 +1000 Message-ID: <28947.1161660977@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 1190 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb ftp://oss.sgi.com/projects/kdb/download/v4.4/ ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ Kernel 2.6.19-rc2 removed a redundant regs parameters from thousands of functions. The kdb-v4.4-2.6.19-rc2-*-1 patches had just enough changes to compile against that kernel, the kdb-v4.4-2.6.19-rc2-*-2 patches delete the redundant regs parameter from the KDB code. I also took the opportunity to delete the redundant envp parameter from the KDB code. If you merely use the KDB patches, use kdb-v4.4-2.6.19-rc2-*-2. If you add your own KDB commands on top of the KDB patches, you can use kdb-v4.4-2.6.19-rc2-*-1 with your existing code or kdb-v4.4-2.6.19-rc2-*-2 if you update your code, as described below. You will have to update your code when 2.6.19-rc3 comes out anyway. To switch from kdb-v4.4-2.6.19-rc2-*-1 to kdb-v4.4-2.6.19-rc2-*-2, delete the envp and regs parameters from any KDB commands that you register. For example, OLD kdb_bt(int argc, const char **argv, const char **envp, struct pt_regs *regs) NEW kdb_bt(int argc, const char **argv) Delete the last (regs) parameter on calls to kdbgetaddrarg(). OLD diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, &symname, regs); NEW diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, &symname); Delete the last (regs) parameter on calls to kdb_parse(). OLD kdb_parse(buf, regs); NEW kdb_parse(buf); Review your KDB code for any remaining use of struct pt_regs, they are almost certainly redundant. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.