Date: Sat, 14 Feb 1998 14:49:58 -0500 (EST) From: "John W. DeBoskey" <jwd@unx.sas.com> To: freebsd-current@FreeBSD.ORG Cc: jwd@unx.sas.com (John W. DeBoskey) Subject: Terry's DIFF.LEASE(Ok) & NFS V3 caching problem Message-ID: <199802141949.AA25321@iluvatar.unx.sas.com>
next in thread | raw e-mail | index | archive | help
Hello,
I have applied DIFF.LEASE from Terry's FreeBSD Page. It was applied
against the 3.0-980212-SNAP. The patched files:
/usr/src/sys/kern:
-rw-r--r-- 1 root wheel 12494 Dec 5 14:55 kern_ktrace.c.orig
-rw-r--r-- 1 root wheel 11171 Nov 20 15:07 link_aout.c.orig
-rw-r--r-- 1 root wheel 5593 Jan 23 21:54 tty_tty.c.orig
-rw-r--r-- 1 root wheel 12670 Feb 6 07:13 vfs_vnops.c.orig
with versions:
* $Id: kern_ktrace.c,v 1.22 1997/12/05 19:55:38 bde Exp $
* $Id: link_aout.c,v 1.5 1997/11/20 20:07:50 bde Exp $
* $Id: tty_tty.c,v 1.22 1998/01/24 02:54:35 eivind Exp $
* $Id: vfs_vnops.c,v 1.49 1998/02/06 12:13:33 eivind Exp $
In and of themselves, the patches applied cleanly. Heavy NFS
V3 usage to a network appliance F540 showed no problems. Thus, I
give this patch a thumbs up with regards to my testing.
The reason I applied these diffs was an attempt to see if they
had any effect on the following problem. I have a file which is
16385 bytes on the NFS server. When the file is cat'd there is a
series of additional rpc reads done due to incorrect EOF detection
and partial block caching. The following sniffer output of the 1st
cat execution shows this. Consecutive cat's always go to the server
to read the final byte of the file.
SUMMARY Delta T Dest Source Summary
46 [.11] [.213] NFS C LOOKUP 16385.bytes in FH=B056
47 0.00025 [.213] [.11] NFS R LOOKUP OK FH=B517
48 0.00014 [.11] [.213] NFS C ACCESS FH=B517 (Read)
49 0.00018 [.213] [.11] NFS R ACCESS OK (Read)
50 0.00027 [.11] [.213] NFS C FSINFO FH=B517
51 0.00018 [.213] [.11] NFS R FSINFO OK
52 0.00019 [.11] [.213] NFS C READ FH=B517 at 0 for 8192
53 0.00003 [.11] [.213] NFS C READ FH=B517 at 8192 for 8192
54 0.00058 [.213] [.11] NFS R READ OK 8192 bytes
58 0.00085 [.213] [.11] NFS R READ OK 8192 bytes
63 0.00050 [.11] [.213] NFS C READ FH=B517 at 16384 for 8192
66 0.00020 [.213] [.11] NFS R READ OK 1 byte (EOF)
67 0.00035 [.11] [.213] Read/write overlap
NFS C READ FH=B517 at 16384 for 512
68 0.00024 [.213] [.11] NFS R READ OK 1 byte (EOF)
69 0.00016 [.11] [.213] File retransmission
NFS C READ FH=B517 at 16384 for 512
70 0.00023 [.213] [.11] NFS R READ OK 1 byte (EOF)
The following patch to nfs_bio.c removes the additional readrpc
calls. It does not address the lack of caching of the last partial block
of the file (a possible bug in the brelse() & vm_page_is_valid() fuctions
or related code. ie: m->valid is 0).
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.47 1998/01/25 06:24:09 dyson Exp $
# diff nfs_bio.c~ nfs_bio.c
242a243,246
> if (uio->uio_offset >= np->n_size) { /* Req past EOF? */
> n = 0; bp = 0;
> break;
> }
452a457,458
> if (uio->uio_offset >= np->n_size)
> n=0;
Unless there is a better way of fixing this problem, would someone
please test & commit this small patch?
Comments? Critiques?
Thanks,
John
--
jwd@unx.sas.com (w) John W. De Boskey (919) 677-8000 x6915
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?199802141949.AA25321>
