From owner-freebsd-arch@FreeBSD.ORG Tue Feb 6 20:57:02 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D80E16A400; Tue, 6 Feb 2007 20:57:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id B90CD13C48E; Tue, 6 Feb 2007 20:57:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id l16KuwUI072784; Tue, 6 Feb 2007 15:56:58 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Attilio Rao" Date: Tue, 6 Feb 2007 15:57:24 -0500 User-Agent: KMail/1.9.1 References: <200702061537.54056.jhb@freebsd.org> <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com> In-Reply-To: <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702061557.24646.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 06 Feb 2007 15:56:58 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2529/Tue Feb 6 14:25:02 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: arch@freebsd.org Subject: Re: Restoring crash dump ability for kvm_getswapinfo(3) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 20:57:02 -0000 On Tuesday 06 February 2007 15:46, Attilio Rao wrote: > 2007/2/6, John Baldwin : > > The patch below fixes kvm_getswapinfo(3) (and thus pstat -T/pstat -s/swapinfo) > > on crash dumps. The one ugliness in it is that since 'struct swdevt' was > > moved into swap_pager.c, there is no longer a header that I can include to > > get it (used to be in vm/swap_pager.h) so I have a copy of the structure in > > kvm_getswapinfo.c. I'd prefer to move the structures back into > > vm/swap_pager.h. > > > > Index: kvm_getswapinfo.c > > =================================================================== > > RCS file: /usr/cvs/src/lib/libkvm/kvm_getswapinfo.c,v > > retrieving revision 1.26 > > diff -u -r1.26 kvm_getswapinfo.c > > --- kvm_getswapinfo.c 31 Jul 2004 18:49:53 -0000 1.26 > > +++ kvm_getswapinfo.c 6 Feb 2007 20:31:09 -0000 > > @@ -49,18 +49,59 @@ > > > > #include "kvm_private.h" > > > > -#define NL_SWAPBLIST 0 > > -#define NL_SWDEVT 1 > > -#define NL_NSWDEV 2 > > -#define NL_DMMAX 3 > > +/* Grrr, this is hidden in swap_pager.c now, how annoying. */ > > +typedef int32_t swblk_t; > > It would not be better exporting swblk_t definition into swap_pager.h, > while you are here? Yes, as I mentioned, I would prefer that, but they were explicitly moved from swap_pager.h to swap_pager.c previously, so I'd like to make sure it is ok to move them back. -- John Baldwin