[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111004101633.6b44201d.kamezawa.hiroyu@jp.fujitsu.com>
Date: Tue, 4 Oct 2011 10:16:33 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Glauber Costa <glommer@...allels.com>
Cc: linux-kernel@...r.kernel.org, paul@...lmenage.org,
lizf@...fujitsu.com, ebiederm@...ssion.com, davem@...emloft.net,
gthelen@...gle.com, netdev@...r.kernel.org, linux-mm@...ck.org,
kirill@...temov.name, avagin@...allels.com
Subject: Re: [PATCH v4 4/8] per-cgroup tcp buffers control
On Mon, 3 Oct 2011 14:18:39 +0400
Glauber Costa <glommer@...allels.com> wrote:
> With all the infrastructure in place, this patch implements
> per-cgroup control for tcp memory pressure handling.
>
> Signed-off-by: Glauber Costa <glommer@...allels.com>
> CC: David S. Miller <davem@...emloft.net>
> CC: Hiroyouki Kamezawa <kamezawa.hiroyu@...fujitsu.com>
> CC: Eric W. Biederman <ebiederm@...ssion.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujtisu.com>
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 from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists