mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-01 16:44:26 +00:00
memcg: disable move charge in no mmu case
In commit 02491447 ("memcg: move charges of anonymous swap"), I tried to disable move charge feature in no mmu case by enclosing all the related functions with "#ifdef CONFIG_MMU", but the commit places these ifdefs in wrong place. (it seems that it's mangled while handling some fixes...) This patch fixes it up. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <balbir@in.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ae6be51ed0
commit
5cfb80a73b
@ -3946,28 +3946,6 @@ one_by_one:
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#else /* !CONFIG_MMU */
|
||||
static int mem_cgroup_can_attach(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
}
|
||||
static void mem_cgroup_move_task(struct cgroup_subsys *ss,
|
||||
struct cgroup *cont,
|
||||
struct cgroup *old_cont,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* is_target_pte_for_mc - check a pte whether it is valid for move charge
|
||||
@ -4330,6 +4308,28 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
|
||||
}
|
||||
mem_cgroup_clear_mc();
|
||||
}
|
||||
#else /* !CONFIG_MMU */
|
||||
static int mem_cgroup_can_attach(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgroup,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
}
|
||||
static void mem_cgroup_move_task(struct cgroup_subsys *ss,
|
||||
struct cgroup *cont,
|
||||
struct cgroup *old_cont,
|
||||
struct task_struct *p,
|
||||
bool threadgroup)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
struct cgroup_subsys mem_cgroup_subsys = {
|
||||
.name = "memory",
|
||||
|
Loading…
x
Reference in New Issue
Block a user