Skip to contentSkip to conversation

don't use highmem in tcp hash size calculation

PATCH In review John Heffner 2 participants 2 messages Nov 7, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't use highmem in tcp hash size calculation

This patch removes consideration of high memory when determining TCP hash table sizes. Taking into account high memory results in tcp_mem values that are too large.

---
commit ea55b7c31b47edf90132baea9a088da3bbe2bb5c
tree 82311e12d4e4e006fba1688cb537de06cf7a4e4b
parent 4f6f9ba021f8a2149238f7c081cd7cf55c70c775
author John Heffner <[email protected]> Mon, 06 Nov 2006 20:03:01 -0500 committer John Heffner <[email protected]> Mon, 06 Nov 2006 20:03:01 -0500

 net/ipv4/tcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/tcp.c +2 -2
index 66e9a72..4322318 100644
@@ -2270,7 +2270,7 @@ void __init tcp_init(void)
 					thash_entries,
 					(num_physpages >= 128 * 1024) ?
 					13 : 15,
-					HASH_HIGHMEM,
+					0,
 					&tcp_hashinfo.ehash_size,
 					NULL,
 					0);
@@ -2286,7 +2286,7 @@ void __init tcp_init(void)
 					tcp_hashinfo.ehash_size,
 					(num_physpages >= 128 * 1024) ?
 					13 : 15,
-					HASH_HIGHMEM,
+					0,
 					&tcp_hashinfo.bhash_size,
 					NULL,
 					64 * 1024);
maintainer
#1 lore raw

Thanks very much for catching this John, patch applied.

Guess what? Nobody uses HASH_HIGHMEM after this change, and frankly I can't think of any valid use of it besides perhaps something such as a page cache hash table but that's irrelevant since we use a per-object tree data structure for that these days.

We should probably kill off HASH_HIGHMEM.