[Devel] [PATCH RHEL7 COMMIT] memcg, bc/vm_pages.c: drop accidental duplicated counter read
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jul 15 18:25:20 MSK 2020
The commit is pushed to "branch-rh7-3.10.0-1127.10.1.vz7.162.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.10.1.vz7.162.9
------>
commit 8197ba04c7359e7bcefc707b1b7e45db6c2acbd5
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Wed Jul 15 18:23:49 2020 +0300
memcg, bc/vm_pages.c: drop accidental duplicated counter read
Nothing bad happens due to this, just a redundant counter read,
drop it.
Fixes: 770906b27920d ("memcg, bc/vm_pages.c: account some swapped memory
as used in CT in /proc/meminfo")
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/memcontrol.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c2713cfd99753..13b9e0cd7b5b6 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4673,8 +4673,6 @@ void mem_cgroup_fill_sysinfo(struct mem_cgroup *memcg, struct sysinfo *si)
swaped = page_counter_read(&memcg->memsw) - page_counter_read(&memcg->memory);
si->totalswap = min(totalswap, memcg->memsw.limit - memcg->memory.limit);
- used = page_counter_read(&memcg->memory);
-
if (swaped > si->totalswap) {
si->freeswap = 0;
used += swaped - si->totalswap;
More information about the Devel
mailing list