Messages in this thread Patch in this message |  | | Date | Mon, 26 Nov 2001 14:50:58 +0100 | Subject | Fix knfsd readahead cache in 2.4.15 | From | Trond Myklebust <> |
| |
Hi Neil,
The following patch fixes a bug in the knfsd readahead code. The memset() that is referenced in the patch below is clobbering the pointer to the next list element (ra->p_next), thus reducing the inode readahead cache to 1 entry upon the very first call to nfsd_get_raparms().
BTW: looking at the choice of cache size. Why is this set to number of threads * 2? Isn't it better to have a minimum cache size? After all, the fact that I have 8 threads running does not at all reflect the number of inodes that I might have open on my various clients...
Cheers, Trond
--- linux-2.4.16-pre1/fs/nfsd/vfs.c.orig Fri Oct 5 21:23:53 2001 +++ linux-2.4.16-pre1/fs/nfsd/vfs.c Mon Nov 26 14:32:09 2001 @@ -560,9 +560,13 @@ return NULL; rap = frap; ra = *frap; - memset(ra, 0, sizeof(*ra)); ra->p_dev = dev; ra->p_ino = ino; + ra->p_reada = 0; + ra->p_ramax = 0; + ra->p_raend = 0; + ra->p_ralen = 0; + ra->p_rawin = 0; found: if (rap != &raparm_cache) { *rap = ra->p_next; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |