On Wednesday 09 August 2006 09:53, David Miller wrote: > [IPV4] route: Dynamic hash table sizing. >
Excellent work David, Thank you !!! > +static int ip_rt_hashsz_limit = (8 * 1024 * 1024) / > sizeof(void *); __read_mostly ? > + hash = __rt_hash_code(list->fl.fl4_dst, > + list->fl.fl4_src & > + (iface << 5), > + nhashmask); I thought it was a XOR (^) , not a AND (&) > static int __init set_rhash_entries(char *str) > { > + unsigned long val; > + > if (!str) > return 0; > - rhash_entries = simple_strtoul(str, &str, 0); > + val = simple_strtoul(str, &str, 0); > + > + /* Only use it if it's a power-of-2. */ > + if (!(val & (val - 1))) > + rhash_entries = val; > + Well, it breaks x86_64 machines that currently do rhash_entries=2000000 Why not round to the next/previous power of two as before ? > return 1; > } > __setup("rhash_entries=", set_rhash_entries); > Thank you Eric - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html