Date: Wed, 11 Feb 1998 17:20:18 -0500 (EST) From: "John W. DeBoskey" <jwd@unx.sas.com> To: freebsd-current@FreeBSD.ORG Cc: jwd@unx.sas.com (John W. DeBoskey) Subject: NFS V3 page caching & vm_page_is_valid() Message-ID: <199802112220.AA20790@iluvatar.unx.sas.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802112220.AA20790>
