Commit 0a263975 authored by Lu Jialin's avatar Lu Jialin
Browse files

memcg: attach memcg async reclaim worker to curcpu

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9PXW6



--------------------------------

Attach memcg async relcaim worker to a curcpu, which will make sure
memcg async reclaim worker will be scheduled among the cpumask belong
to the current's cpuset.

Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
parent acc28460
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2844,6 +2844,12 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
#ifdef CONFIG_MEMCG_V1_THRESHOLD_QOS
		if (is_high_async_reclaim(memcg) && !mem_high) {
			WRITE_ONCE(memcg->high_async_reclaim, true);
#ifdef CONFIG_MEMCG_SWAP_QOS
			if (static_branch_likely(&memcg_swap_qos_key))
				schedule_work_on(smp_processor_id(),
						 &memcg->high_work);
			else
#endif
				schedule_work(&memcg->high_work);
			break;
		}