[Devel] [PATCH RHEL8 COMMIT] memcg: fixes accounting for allocations called in "disabled
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Oct 5 13:20:48 MSK 2020
The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.11
------>
commit 060218e7064c3f370b0a8f6bbe8017971c15a89d
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Mon Oct 5 13:20:48 2020 +0300
memcg: fixes accounting for allocations called in "disabled
BH" context #PSBM-120694
Message-ID: <49f823ed-279d-2bba-ed53-aebf362c84e0 at virtuozzo.com>
Date: Mon, 5 Oct 2020 10:47:46 +0300
in_interrupt() check includes "have BH disabled" case,
as result allocations called with disabled BH are not accounted to
proper memory cgroup.
https://jira.sw.ru/browse/PSBM-120694
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 71e0697ff838..df70c3bdd444 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2630,7 +2630,7 @@ static void memcg_schedule_kmem_cache_create(struct mem_cgroup *memcg,
static inline bool memcg_kmem_bypass(void)
{
- if (in_interrupt() || !current->mm || (current->flags & PF_KTHREAD))
+ if (!in_task() || !current->mm || (current->flags & PF_KTHREAD))
return true;
return false;
}
More information about the Devel
mailing list