Thread (34 messages) 34 messages, 4 authors, 2011-10-06

Re: [PATCH v4 4/8] per-cgroup tcp buffers control

From: KAMEZAWA Hiroyuki <hidden>
Date: 2011-10-04 01:17:27
Also in: lkml, netdev

On Mon,  3 Oct 2011 14:18:39 +0400
Glauber Costa [off-list ref] wrote:
With all the infrastructure in place, this patch implements
per-cgroup control for tcp memory pressure handling.

Signed-off-by: Glauber Costa <redacted>
CC: David S. Miller <davem@davemloft.net>
CC: Hiroyouki Kamezawa <redacted>
CC: Eric W. Biederman <redacted>
Reviewed-by: KAMEZAWA Hiroyuki <redacted>

One question.
+void tcp_enter_memory_pressure(struct sock *sk)
+{
+	struct mem_cgroup *memcg = sk->sk_cgrp;
+	if (!memcg->tcp.tcp_memory_pressure) {
+		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURES);
+		memcg->tcp.tcp_memory_pressure = 1;
+	}
+}
It seems memcg->tcp.tcp_memory_pressure has no locks and not atomic.

no problematic race ?

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help