Date: Wed, 23 Jun 2004 09:54:05 +0100 From: Bruce M Simpson <bms@spc.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Alan Cox <alc@cs.rice.edu> Subject: Re: kern/67898: page fault while in kernel mode Message-ID: <20040623085405.GI3838@empiric.dek.spc.org> In-Reply-To: <15673.1087979812@critter.freebsd.dk> References: <20040623082822.GM18577@cs.rice.edu> <15673.1087979812@critter.freebsd.dk>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040623085405.GI3838>
