Re: [PATCH v3 6/7] tcp buffer limitation: per-cgroup limit
flat view
From: Greg Thelen <hidden>
Date: 2011-09-22 06:02:12
Also in:
linux-mm, lkml
On Sun, Sep 18, 2011 at 5:56 PM, Glauber Costa [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+static inline bool mem_cgroup_is_root(struct mem_cgroup *mem) +{ + return (mem == root_mem_cgroup); +} +
Why are you adding a copy of mem_cgroup_is_root(). I see one already in v3.0. Was it deleted in a previous patch?
quoted hunk ↗ jump to hunk
+static int tcp_write_maxmem(struct cgroup *cgrp, struct cftype *cft, u64 val) +{ + struct mem_cgroup *sg = mem_cgroup_from_cont(cgrp); + struct mem_cgroup *parent = parent_mem_cgroup(sg); + struct net *net = current->nsproxy->net_ns; + int i; + + if (!cgroup_lock_live_group(cgrp)) + return -ENODEV;
Why is cgroup_lock_live_cgroup() needed here? Does it protect updates to sg->tcp_prot_mem[*]?
quoted hunk ↗ jump to hunk
+static u64 tcp_read_maxmem(struct cgroup *cgrp, struct cftype *cft) +{ + struct mem_cgroup *sg = mem_cgroup_from_cont(cgrp); + u64 ret; + + if (!cgroup_lock_live_group(cgrp)) + return -ENODEV;
Why is cgroup_lock_live_cgroup() needed here? Does it protect updates to sg->tcp_max_memory? -- 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>