Commit 6b611388 authored by Shakeel Butt's avatar Shakeel Butt Committed by Andrew Morton
Browse files

memcg-v1: remove charge move code

The memcg-v1 charge move feature has been deprecated completely and let's
remove the relevant code as well.

Link: https://lkml.kernel.org/r/20241025012304.2473312-3-shakeel.butt@linux.dev


Signed-off-by: default avatarShakeel Butt <shakeel.butt@linux.dev>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Reviewed-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent aa6b4fdf
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -299,11 +299,6 @@ struct mem_cgroup {
	/* For oom notifier event fd */
	struct list_head oom_notify;

	/*
	 * Should we move charges of a task when a task is moved into this
	 * mem_cgroup ? And what type of charges should we move ?
	 */
	unsigned long move_charge_at_immigrate;
	/* taken only while moving_account > 0 */
	spinlock_t move_lock;
	unsigned long move_lock_flags;
+0 −887

File changed.

Preview size limit exceeded, changes collapsed.

+0 −6

File changed.

Preview size limit exceeded, changes collapsed.

+0 −9
Original line number Diff line number Diff line
@@ -2242,12 +2242,6 @@ int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask,
	 */
	if (nr_reclaimed && nr_pages <= (1 << PAGE_ALLOC_COSTLY_ORDER))
		goto retry;
	/*
	 * At task move, charge accounts can be doubly counted. So, it's
	 * better to wait until the end of task_move if something is going on.
	 */
	if (memcg1_wait_acct_move(mem_over_limit))
		goto retry;

	if (nr_retries--)
		goto retry;
@@ -4441,9 +4435,6 @@ struct cgroup_subsys memory_cgrp_subsys = {
	.exit = mem_cgroup_exit,
	.dfl_cftypes = memory_files,
#ifdef CONFIG_MEMCG_V1
	.can_attach = memcg1_can_attach,
	.cancel_attach = memcg1_cancel_attach,
	.post_attach = memcg1_move_task,
	.legacy_cftypes = mem_cgroup_legacy_files,
#endif
	.early_init = 0,