Subject: Re: [PATCH] limit rt cache size

From: Kirill Korotaev <[email-masked]>
Date: Tue, 08 Aug 2006 16:54:40 +0400

David Miller wrote:
> From: Andi Kleen <[email-masked]>
> Date: Tue, 8 Aug 2006 08:53:03 +0200
> 
> 
>>That's still too big. Consider a 2TB machine, with all memory in LOWMEM.
> 
> 
> Andi I agree with you, route.c should pass in a suitable limit.
> I'm just suggesting a fix for a seperate problem.

So summaring up we have the following issues imho:
1a) rt hash size should be calculated based on lowmem size, not total size
1b) rt hash size should have some upper limit (requested by Andi Kleen for huge mem systems)
2a) max number of rt hash entries should be calculated based on low memory, not as
   rt_hash_chains*16.
2b) when CONFIG_DEBUG_SLAB and CONFIG_DEBUG_PAGE_ALLOC are ON, 2a) should be corrected
   taking into account _real_ rtable entry size (one page instead of 256b!!!).
3) should we limit TCP hashe and hashb size the same way?

If I haven't missed something I will prepare a patch for 1-2) and
a separate patch for 3).

Thanks,
Kirill