Date: Thu, 26 Aug 1999 13:34:23 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: "John W. DeBoskey" <jwd@unx.sas.com>, phk@critter.freebsd.dk (Poul-Henning Kamp), julian@whistle.com, jwd@unx.sas.com, freebsd-current@FreeBSD.ORG Subject: tentative fix (was Re: -current kernel problems (spec_getpages & vm_fault)) Message-ID: <199908262034.NAA24744@apollo.backplane.com> References: <199908261958.PAA46391@bb01f39.unx.sas.com> <199908262013.NAA24637@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
The first part of this patch is not yet part of my multipatch at http://www.backplane.com/FreeBSD4/ This is a tentative fix, but I believe it to be correct. Until yesterday I was testing swap-backed VN with only one swap partition, otherwise this would have been found and fixed long ago :-( I'm doing a buildworld stress test now to make sure it's been fixed. -Matt Index: swap_pager.c =================================================================== RCS file: /home/ncvs/src/sys/vm/swap_pager.c,v retrieving revision 1.124 diff -u -r1.124 swap_pager.c --- swap_pager.c 1999/08/23 23:55:03 1.124 +++ swap_pager.c 1999/08/26 20:20:09 @@ -830,13 +830,19 @@ splx(s); /* - * Do we have to flush our current collection? + * Do we have to flush our current collection? Yes if: + * + * - no swap block at this index + * - swap block is not contiguous + * - we cross a physical disk boundry in the + * stripe. */ if ( nbp && ( (blk & SWAPBLK_NONE) || - nbp->b_blkno + btoc(nbp->b_bcount) != blk + nbp->b_blkno + btoc(nbp->b_bcount) != blk || + ((nbp->b_blkno ^ blk) & dmmax_mask) ) ) { ++cnt.v_swapin; @@ -857,6 +863,7 @@ if (nbp == NULL) { nbp = getchainbuf(bp, swapdev_vp, B_READ|B_ASYNC); nbp->b_blkno = blk; + nbp->b_bcount = 0; nbp->b_data = data; } nbp->b_bcount += PAGE_SIZE; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908262034.NAA24744>