mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 07:35:20 +07:00
761b3ef50e
The argument is not used at all, and it's not necessary, because a specific callback handler of course knows which subsys it belongs to. Now only ->pupulate() takes this argument, because the handlers of this callback always call cgroup_add_file()/cgroup_add_files(). So we reduce a few lines of code, though the shrinking of object size is minimal. 16 files changed, 113 insertions(+), 162 deletions(-) text data bss dec hex filename 5486240 656987 7039960 13183187 c928d3 vmlinux.o.orig 5486170 656987 7039960 13183117 c9288d vmlinux.o Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
20 lines
667 B
C
20 lines
667 B
C
#ifndef _TCP_MEMCG_H
|
|
#define _TCP_MEMCG_H
|
|
|
|
struct tcp_memcontrol {
|
|
struct cg_proto cg_proto;
|
|
/* per-cgroup tcp memory pressure knobs */
|
|
struct res_counter tcp_memory_allocated;
|
|
struct percpu_counter tcp_sockets_allocated;
|
|
/* those two are read-mostly, leave them at the end */
|
|
long tcp_prot_mem[3];
|
|
int tcp_memory_pressure;
|
|
};
|
|
|
|
struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg);
|
|
int tcp_init_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss);
|
|
void tcp_destroy_cgroup(struct cgroup *cgrp);
|
|
unsigned long long tcp_max_memory(const struct mem_cgroup *memcg);
|
|
void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx);
|
|
#endif /* _TCP_MEMCG_H */
|