tcp_memcontrol.h 667 B

1234567891011121314151617181920
  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 cgroup *cgrp, struct cgroup_subsys *ss);
  14. void tcp_destroy_cgroup(struct cgroup *cgrp);
  15. unsigned long long tcp_max_memory(const struct mem_cgroup *memcg);
  16. void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx);
  17. #endif /* _TCP_MEMCG_H */