]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/memcg: remove unneeded nr_scanned
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 14 Apr 2022 06:07:04 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:04 +0000 (23:07 -0700)
commit7ab3bc0f2769b0d23cf6377d51c06c84c9e21825
tree87cbf2b16ad9cef898f9cd6408fbd95abe66ddbc
parentdcece70b7a5fa3212dccc8dd11576f13056c9c81
mm/memcg: remove unneeded nr_scanned

The local variable nr_scanned is unneeded as mem_cgroup_soft_reclaim
always does *total_scanned += nr_scanned.  So we can pass total_scanned
directly to the mem_cgroup_soft_reclaim to simplify the code and save some
cpu cycles of adding nr_scanned to total_scanned.

Link: https://lkml.kernel.org/r/20220328114144.53389-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c