+9
−0
Loading
mainline inclusion from mainline-v6.0-rc1 commit d6e103a7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9ORR4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6e103a757fa7876e7ded76128d5dffe12402ab9 -------------------------------- Yafang Shao reported an issue related to the accounting of bpf memory: if a bpf map is charged indirectly for memory consumed from an interrupt context and allocations are enforced, MEMCG_MAX events are not raised. It's not/less of an issue in a generic case because consequent allocations from a process context will trigger the direct reclaim and MEMCG_MAX events will be raised. However a bpf map can belong to a dying/abandoned memory cgroup, so there will be no allocations from a process context and no MEMCG_MAX events will be triggered. Link: https://lkml.kernel.org/r/20220702033521.64630-1-roman.gushchin@linux.dev Signed-off-by:Roman Gushchin <roman.gushchin@linux.dev> Reported-by:
Yafang Shao <laoar.shao@gmail.com> Acked-by:
Shakeel Butt <shakeelb@google.com> Acked-by:
Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Conflicts: mm/memcontrol.c [There are context conflicts bacause commit c5c8b16b("mm: memcontrol: fix root_mem_cgroup charging") is not merged. And we merge commit 789303ae("mm: vmpressure: don't count proactive reclaim in vmpressure")] Signed-off-by:
Cai Xinchen <caixinchen1@huawei.com>