Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de3b566a authored by Eric Dumazet's avatar Eric Dumazet Committed by Subash Abhinov Kasiviswanathan
Browse files

tcp: fix/cleanup inet_ehash_locks_alloc()



If tcp ehash table is constrained to a very small number of buckets
(eg boot parameter thash_entries=128), then we can crash if spinlock
array has more entries.

While we are at it, un-inline inet_ehash_locks_alloc() and make
following changes :

- Budget 2 cache lines per cpu worth of 'spinlocks'
- Try to kmalloc() the array to avoid extra TLB pressure.
  (Most servers at Google allocate 8192 bytes for this hash table)
- Get rid of various #ifdef

Change-Id: I355b55126858b256c7eb9c79810134ca2df293cb
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 095dc8e0c3686d586a01a50abc3e1bb9ac633054
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 9f624328
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment