Skip to content

Commit

Permalink
mm: memcontrol: drop unused @css argument in memcg_init_kmem
Browse files Browse the repository at this point in the history
This series adds accounting of the historical "kmem" memory consumers to
the cgroup2 memory controller.

These consumers include the dentry cache, the inode cache, kernel stack
pages, and a few others that are pointed out in patch 7/8.  The
footprint of these consumers is directly tied to userspace activity in
common workloads, and so they have to be part of the minimally viable
configuration in order to present a complete feature to our users.

The cgroup2 interface of the memory controller is far from complete, but
this series, along with the socket memory accounting series, provides
the final semantic changes for the existing memory knobs in the cgroup2
interface, which is scheduled for initial release in the next merge
window.

This patch (of 8):

Remove unused css argument frmo memcg_init_kmem()

Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Tejun Heo <[email protected]>
Acked-by: Vladimir Davydov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hnaz authored and torvalds committed Jan 21, 2016
1 parent 545b5e2 commit 6d378da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/net/tcp_memcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
struct cgroup_subsys;
struct mem_cgroup;

int tcp_init_cgroup(struct mem_cgroup *memcg, struct cgroup_subsys *ss);
int tcp_init_cgroup(struct mem_cgroup *memcg);
void tcp_destroy_cgroup(struct mem_cgroup *memcg);

#endif /* _TCP_MEMCG_H */
6 changes: 3 additions & 3 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -3583,15 +3583,15 @@ static int mem_cgroup_oom_control_write(struct cgroup_subsys_state *css,
}

#ifdef CONFIG_MEMCG_KMEM
static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
static int memcg_init_kmem(struct mem_cgroup *memcg)
{
int ret;

ret = memcg_propagate_kmem(memcg);
if (ret)
return ret;

return tcp_init_cgroup(memcg, ss);
return tcp_init_cgroup(memcg);
}

static void memcg_deactivate_kmem(struct mem_cgroup *memcg)
Expand Down Expand Up @@ -4274,7 +4274,7 @@ mem_cgroup_css_online(struct cgroup_subsys_state *css)
}
mutex_unlock(&memcg_create_mutex);

ret = memcg_init_kmem(memcg, &memory_cgrp_subsys);
ret = memcg_init_kmem(memcg);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <linux/memcontrol.h>
#include <linux/module.h>

int tcp_init_cgroup(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
int tcp_init_cgroup(struct mem_cgroup *memcg)
{
struct mem_cgroup *parent = parent_mem_cgroup(memcg);
struct page_counter *counter_parent = NULL;
Expand Down

0 comments on commit 6d378da

Please sign in to comment.