[RH7,2/2] memcg, bc/vm_pages.c: drop accidental duplicated counter read

Submitted by Konstantin Khorenko on July 16, 2020, 12:37 p.m.

Details

Message ID 20200716123717.9402-2-khorenko@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko July 16, 2020, 12:37 p.m.
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@virtuozzo.com>
---
 mm/memcontrol.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8cd925d0b2078..62370e72b99b6 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4672,8 +4672,6 @@  void mem_cgroup_fill_sysinfo(struct mem_cgroup *memcg, struct sysinfo *si)
 	/* CT can report totalswap > SWAP available on Host */
 	si->totalswap = memcg->memsw.limit - memcg->memory.limit;
 
-	used = page_counter_read(&memcg->memory);
-
 	if (swaped > si->totalswap) {
 		si->freeswap = 0;
 		used += swaped - si->totalswap;

Comments

Konstantin Khorenko July 16, 2020, 12:38 p.m.
please, ignore

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 07/16/2020 03:37 PM, Konstantin Khorenko wrote:
> 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@virtuozzo.com>
> ---
>  mm/memcontrol.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 8cd925d0b2078..62370e72b99b6 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4672,8 +4672,6 @@ void mem_cgroup_fill_sysinfo(struct mem_cgroup *memcg, struct sysinfo *si)
>  	/* CT can report totalswap > SWAP available on Host */
>  	si->totalswap = memcg->memsw.limit - memcg->memory.limit;
>
> -	used = page_counter_read(&memcg->memory);
> -
>  	if (swaped > si->totalswap) {
>  		si->freeswap = 0;
>  		used += swaped - si->totalswap;
>