blob: 3512082fa9099ac2c71327f501fbd182c24dcca2 [file] [log] [blame]
Glauber Costad1a4c0b2011-12-11 21:47:04 +00001#ifndef _TCP_MEMCG_H
2#define _TCP_MEMCG_H
3
4struct tcp_memcontrol {
5 struct cg_proto cg_proto;
6 /* per-cgroup tcp memory pressure knobs */
7 struct res_counter tcp_memory_allocated;
8 struct percpu_counter tcp_sockets_allocated;
9 /* those two are read-mostly, leave them at the end */
10 long tcp_prot_mem[3];
11 int tcp_memory_pressure;
12};
13
14struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg);
15int tcp_init_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss);
16void tcp_destroy_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss);
Glauber Costa3aaabe22011-12-11 21:47:06 +000017unsigned long long tcp_max_memory(const struct mem_cgroup *memcg);
18void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx);
Glauber Costad1a4c0b2011-12-11 21:47:04 +000019#endif /* _TCP_MEMCG_H */