From owner-freebsd-current Wed Feb 11 14:20:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA02502 for current-outgoing; Wed, 11 Feb 1998 14:20:54 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lamb.sas.com (root@lamb.sas.com [192.35.83.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA02497 for ; Wed, 11 Feb 1998 14:20:49 -0800 (PST) (envelope-from jwd@unx.sas.com) Received: from mozart (markham.southpeak.com [192.58.185.8]) by lamb.sas.com (8.8.7/8.8.7) with SMTP id RAA20368 for ; Wed, 11 Feb 1998 17:20:19 -0500 (EST) Received: from iluvatar.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA01189; Wed, 11 Feb 1998 17:20:19 -0500 From: "John W. DeBoskey" Received: by iluvatar.unx.sas.com (5.65c/SAS/Generic 9.01/3-26-93) id AA20790; Wed, 11 Feb 1998 17:20:19 -0500 Message-Id: <199802112220.AA20790@iluvatar.unx.sas.com> Subject: NFS V3 page caching & vm_page_is_valid() To: freebsd-current@FreeBSD.ORG Date: Wed, 11 Feb 1998 17:20:18 -0500 (EST) Cc: jwd@unx.sas.com (John W. DeBoskey) X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, For this test, I am cat'ing a 16385 byte file from an NFS V3 fileserver. ie: 2 8k blocks and a 1byte frag. The completely full pages are cached correctly. The last partial page is not. As I trace nfs_bioread() into brelse() and then into vm_page_is_valid(), I find that m->valid is 0. (kgdb) p m->valid $12 = 0 '\000' (kgdb) p bits $13 = 1 Thus, the following statement: if (m->valid && ((m->valid & bits) == bits)) return 1; else return 0 is false, and we are returning 0. Unfortunately, there is 1 single solitary valid byte in this buffer. Due to the above, the buffer is tossed causing an nfs readrpc to the server to read the tail of the file everytime. Yuck. I am continuing to trace this problem, but any hints about where to look for how the decision to set m->valid is made would be much appreciated. Thanks, John ps: Thanks for pushing the logical vs bitwise and fix. -- jwd@unx.sas.com (w) John W. De Boskey (919) 677-8000 x6915 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe current" in the body of the message