aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@parallels.com>2011-12-11 16:47:02 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-12 19:04:10 -0500
commit180d8cd942ce336b2c869d324855c40c5db478ad (patch)
tree2424d854345d81464d6030ef8090a8e22bd414b0 /net/ipv4/tcp_output.c
parente5671dfae59b165e2adfd4dfbdeab11ac8db5bda (diff)
foundations of per-cgroup memory pressure controlling.
This patch replaces all uses of struct sock fields' memory_pressure, memory_allocated, sockets_allocated, and sysctl_mem to acessor macros. Those macros can either receive a socket argument, or a mem_cgroup argument, depending on the context they live in. Since we're only doing a macro wrapping here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by: Glauber Costa <glommer@parallels.com> Reviewed-by: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com> CC: David S. Miller <davem@davemloft.net> CC: Eric W. Biederman <ebiederm@xmission.com> CC: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index cf3068038942..8c8de2780c7a 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1922,7 +1922,7 @@ u32 __tcp_select_window(struct sock *sk)
1922 if (free_space < (full_space >> 1)) { 1922 if (free_space < (full_space >> 1)) {
1923 icsk->icsk_ack.quick = 0; 1923 icsk->icsk_ack.quick = 0;
1924 1924
1925 if (tcp_memory_pressure) 1925 if (sk_under_memory_pressure(sk))
1926 tp->rcv_ssthresh = min(tp->rcv_ssthresh, 1926 tp->rcv_ssthresh = min(tp->rcv_ssthresh,
1927 4U * tp->advmss); 1927 4U * tp->advmss);
1928 1928