net: avoid limits overflow
Robin Holt tried to boot a 16TB machine and found some limits were reached : sysctl_tcp_mem[2], sysctl_udp_mem[2] We can switch infrastructure to use long "instead" of "int", now atomic_long_t primitives are available for free. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reported-by: Robin Holt <holt@sgi.com> Reviewed-by: Robin Holt <holt@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
67286640f6
commit
8d987e5c75
@@ -762,7 +762,7 @@ struct proto {
|
||||
|
||||
/* Memory pressure */
|
||||
void (*enter_memory_pressure)(struct sock *sk);
|
||||
atomic_t *memory_allocated; /* Current allocated memory. */
|
||||
atomic_long_t *memory_allocated; /* Current allocated memory. */
|
||||
struct percpu_counter *sockets_allocated; /* Current number of sockets. */
|
||||
/*
|
||||
* Pressure flag: try to collapse.
|
||||
@@ -771,7 +771,7 @@ struct proto {
|
||||
* is strict, actions are advisory and have some latency.
|
||||
*/
|
||||
int *memory_pressure;
|
||||
int *sysctl_mem;
|
||||
long *sysctl_mem;
|
||||
int *sysctl_wmem;
|
||||
int *sysctl_rmem;
|
||||
int max_header;
|
||||
|
Reference in New Issue
Block a user