*** nfs_serv.c Fri Jun 13 10:38:17 2003 --- nfs_serv.c.orig Fri Jun 13 10:35:33 2003 *************** *** 107,113 **** #define MAX_COMMIT_COUNT (1024 * 1024) ! #define NUM_HEURISTIC 1017 #define NHUSE_INIT 64 #define NHUSE_INC 16 #define NHUSE_MAX 2048 --- 107,113 ---- #define MAX_COMMIT_COUNT (1024 * 1024) ! #define NUM_HEURISTIC 64 #define NHUSE_INIT 64 #define NHUSE_INC 16 #define NHUSE_MAX 2048 *************** *** 857,869 **** { int hi; ! int try = 32; /* * Locate best candidate */ ! hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; nh = &nfsheur[hi]; while (try--) { --- 857,869 ---- { int hi; ! int try = 4; /* * Locate best candidate */ ! hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) & (NUM_HEURISTIC - 1); nh = &nfsheur[hi]; while (try--) { *************** *** 873,879 **** } if (nfsheur[hi].nh_use > 0) --nfsheur[hi].nh_use; ! hi = (hi + 1) % NUM_HEURISTIC; if (nfsheur[hi].nh_use < nh->nh_use) nh = &nfsheur[hi]; } --- 873,879 ---- } if (nfsheur[hi].nh_use > 0) --nfsheur[hi].nh_use; ! hi = (hi + 1) & (NUM_HEURISTIC - 1); if (nfsheur[hi].nh_use < nh->nh_use) nh = &nfsheur[hi]; }