[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how not to write a search algorithm



On Sun, Aug 04, 2002 at 04:03:11PM -0700, Andrew Morton wrote:
> The list walk is killing us now.   I think we need:
> struct pte_chain {
> 	struct pte_chain *next;
> 	pte_t *ptes[L1_CACHE_BYTES/4 - 4];
> };
> Still poking...

Could I get a

pte_t *ptes[(L1_CACHE_BYTES - sizeof(struct pte_chain *))/(sizeof(pte_t *))] ?

Well, regardless, the mean pte_chain length for chains of length > 1 is
around 6, and the std. dev. is around 12, and the distribution is *very*
long-tailed, so this is just about guaranteed to help at the cost of some
slight internal fragmentation.


Cheers,
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/