From owner-freebsd-hackers Mon Jan 18 17:20:24 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA16236 for freebsd-hackers-outgoing; Mon, 18 Jan 1999 17:20:24 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA16229 for ; Mon, 18 Jan 1999 17:20:15 -0800 (PST) (envelope-from root@dyson.iquest.net) Received: (qmail 4151 invoked from network); 19 Jan 1999 01:20:09 -0000 Received: from dyson.iquest.net (198.70.144.127) by iquest3.iquest.net with SMTP; 19 Jan 1999 01:20:09 -0000 Received: (from root@localhost) by dyson.iquest.net (8.9.1/8.9.1) id UAA27272; Mon, 18 Jan 1999 20:20:06 -0500 (EST) From: "John S. Dyson" Message-Id: <199901190120.UAA27272@dyson.iquest.net> Subject: Re: Found problem w/ Paging performance over NFS In-Reply-To: <199901190001.QAA82498@apollo.backplane.com> from Matthew Dillon at "Jan 18, 99 04:01:52 pm" To: dillon@apollo.backplane.com (Matthew Dillon) Date: Mon, 18 Jan 1999 20:20:06 -0500 (EST) Cc: dg@root.com, jkh@FreeBSD.ORG, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Here's another piece of code to check: > > in kern/vfs_bio.c, allocbuf() > > } else if (m->flags & PG_BUSY) { > s = splvm(); > if (m->flags & PG_BUSY) { > vm_page_flag_set(m, PG_WANTED); > tsleep(m, PVM, "pgtblk", 0); > } > splx(s); > goto doretry; > } else { > ... > if (tinc > (newbsize - toff)) > tinc = newbsize - toff; > if (bp->b_flags & B_CACHE) > vfs_buf_set_valid(bp, off, toff, tinc, m); > vm_page_flag_clear(m, PG_ZERO); > vm_page_wire(m); > } > > Shouldn't those conditionals be 'm->busy || (m->flags & PG_BUSY)' instead > of just testing against PG_BUSY? A pageout operation will set m->busy > without setting PG_BUSY. > The existing code is okay. Pageouts don't need to set PG_BUSY. Also, *generally* during buffer cache read write operations, the PG_BUSY flag doesn't need to be set during the *entire* operation. Think filesystems with block sizes < PAGE_SIZE as an example. PG_BUSY is quite severe, and not always needed. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message