tcp_memcontrol.h 610 B

123456789101112131415161718
  1. #ifndef _TCP_MEMCG_H
  2. #define _TCP_MEMCG_H
  3. struct tcp_memcontrol {
  4. struct cg_proto cg_proto;
  5. /* per-cgroup tcp memory pressure knobs */
  6. struct res_counter tcp_memory_allocated;
  7. struct percpu_counter tcp_sockets_allocated;
  8. /* those two are read-mostly, leave them at the end */
  9. long tcp_prot_mem[3];
  10. int tcp_memory_pressure;
  11. };
  12. struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg);
  13. int tcp_init_cgroup(struct mem_cgroup *memcg, struct cgroup_subsys *ss);
  14. void tcp_destroy_cgroup(struct mem_cgroup *memcg);
  15. void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx);
  16. #endif /* _TCP_MEMCG_H */