From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 23 08:54:19 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3DD016A4CE; Wed, 23 Jun 2004 08:54:18 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6327D43D2D; Wed, 23 Jun 2004 08:54:18 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id DD15C65410; Wed, 23 Jun 2004 09:54:06 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 78994-02-2; Wed, 23 Jun 2004 09:54:06 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id EC4D1653F9; Wed, 23 Jun 2004 09:54:05 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 37CB46148; Wed, 23 Jun 2004 09:54:05 +0100 (BST) Date: Wed, 23 Jun 2004 09:54:05 +0100 From: Bruce M Simpson To: Poul-Henning Kamp Message-ID: <20040623085405.GI3838@empiric.dek.spc.org> References: <20040623082822.GM18577@cs.rice.edu> <15673.1087979812@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15673.1087979812@critter.freebsd.dk> cc: alc@FreeBSD.org cc: freebsd-bugs@FreeBSD.org cc: Alan Cox Subject: Re: kern/67898: page fault while in kernel mode X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 08:54:19 -0000 On Wed, Jun 23, 2004 at 10:36:52AM +0200, Poul-Henning Kamp wrote: > I don't really have a good idea. The devtoname() is patently invalid > in the face of paging to NFS so I guess we'd have to stick a name > string in swdevt and print that if we don't just remove the devtoname() > entirely. The assumption which kvm_getswapinfo() currently makes is to simply substitute the string "[NFS swap]" for the case of (dev == NODEV). Therefore, might I suggest the following: %% Index: src/sys/vm/swap_pager.c =================================================================== RCS file: /home/ncvs/src/sys/vm/swap_pager.c,v retrieving revision 1.252 diff -u -r1.252 swap_pager.c --- src/sys/vm/swap_pager.c 17 Jun 2004 17:16:53 -0000 1.252 +++ src/sys/vm/swap_pager.c 23 Jun 2004 08:53:28 -0000 @@ -1125,6 +1125,8 @@ * cleared on completion. If an I/O error occurs, SWAPBLK_NONE * is set in the meta-data. */ +#define GETSWDEVNAME(_bp) \ + ((_bp)->b_dev == NODEV ? "[NFS swap]" : devtoname(bp->b_dev)) s = splvm(); vm_page_lock_queues(); while ((mreq->flags & PG_SWAPINPROG) != 0) { @@ -1134,11 +1136,12 @@ printf( "swap_pager: indefinite wait buffer: device:" " %s, blkno: %ld, size: %ld\n", - devtoname(bp->b_dev), (long)bp->b_blkno, + GETSWDEVNAME(bp), (long)bp->b_blkno, bp->b_bcount ); } } +#undef GETSWDEVNAME vm_page_unlock_queues(); splx(s); %% Regards, BMS