From owner-cvs-all Tue Sep 29 11:31:38 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA12358 for cvs-all-outgoing; Tue, 29 Sep 1998 11:31:38 -0700 (PDT) (envelope-from owner-cvs-all) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA12283; Tue, 29 Sep 1998 11:31:10 -0700 (PDT) (envelope-from dillon@backplane.com) Received: (dillon@localhost) by apollo.backplane.com (8.9.1/8.6.5) id LAA20898; Tue, 29 Sep 1998 11:30:56 -0700 (PDT) Date: Tue, 29 Sep 1998 11:30:56 -0700 (PDT) From: Matthew Dillon Message-Id: <199809291830.LAA20898@apollo.backplane.com> To: dillon@apollo.backplane.com Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: A second mmap file corruption issue Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bleh. ok, that didn't work :-) I guess any page replaced by bogus_page is supposed to be left wired, so a vmlookup when it's reloaded into the bp doesn't have to rewire it. This bogus_page and wire count stuff is scary. -Matt : : (1) around line 659 of kern/vfs_bio.c, in brelse(). I think the page : needs to be wired !!!!!!! Won't the wire count get corrupted : when the bp is released and the page isn't wired ? : : if (m == bogus_page) { : m = vm_page_lookup(obj, poff + j); : ... : bp->b_pages[j] = m; : } : : : (2) around line 1969 of kern/vfs_bio.c, in biodone. I think this : page needs to be wired as well. : : if (m == bogus_page) { : bogusflag = 1; : m = vm_page_lookup(obj, OFF_TO_IDX(foff)); : ... : bp->b_pages[i] = m; : pmap_qenter(trunc_page(bp->b_data), bp->b_pages, bp->b_npages); : } : : : (3) Could someone also check vfs_busy_pages() and vfs_unbusy_pages() ? : busy_pages removes pages from the bp without unwiring them, : presumably because unbusy_pages adds them back without wiring : them. That seems rather fragile to me but I *think* the code is : doing the right thing as long as all vfs_busy_pages() calls are : matched by vfs_unbusy_pages() calls. : : -Matt : : Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet : Communications & God knows what else. : (Please include original email in any response) : Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet Communications & God knows what else. (Please include original email in any response)