summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-04-29 19:40:11 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-09-27 15:27:31 +0200
commit6e0110c247c8794a16573d1e238f92489cc27c8a (patch)
tree902dae9e29c314fe6259d5ec7c4506ea62e64152 /mm/memcontrol.c
parentmm: Add folio_nid() (diff)
downloadlinux-6e0110c247c8794a16573d1e238f92489cc27c8a.tar.xz
linux-6e0110c247c8794a16573d1e238f92489cc27c8a.zip
mm/memcg: Remove 'page' parameter to mem_cgroup_charge_statistics()
The last use of 'page' was removed by commit 468c398233da ("mm: memcontrol: switch to native NR_ANON_THPS counter"), so we can now remove the parameter from the function. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: David Howells <dhowells@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6da5020a8656..7d560bbcac70 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -799,7 +799,6 @@ static unsigned long memcg_events_local(struct mem_cgroup *memcg, int event)
}
static void mem_cgroup_charge_statistics(struct mem_cgroup *memcg,
- struct page *page,
int nr_pages)
{
/* pagein of a big page is an event. So, ignore page size */
@@ -5669,9 +5668,9 @@ static int mem_cgroup_move_account(struct page *page,
ret = 0;
local_irq_disable();
- mem_cgroup_charge_statistics(to, page, nr_pages);
+ mem_cgroup_charge_statistics(to, nr_pages);
memcg_check_events(to, page);
- mem_cgroup_charge_statistics(from, page, -nr_pages);
+ mem_cgroup_charge_statistics(from, -nr_pages);
memcg_check_events(from, page);
local_irq_enable();
out_unlock:
@@ -6693,7 +6692,7 @@ static int charge_memcg(struct page *page, struct mem_cgroup *memcg, gfp_t gfp)
commit_charge(page, memcg);
local_irq_disable();
- mem_cgroup_charge_statistics(memcg, page, nr_pages);
+ mem_cgroup_charge_statistics(memcg, nr_pages);
memcg_check_events(memcg, page);
local_irq_enable();
out:
@@ -6976,7 +6975,7 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)
commit_charge(newpage, memcg);
local_irq_save(flags);
- mem_cgroup_charge_statistics(memcg, newpage, nr_pages);
+ mem_cgroup_charge_statistics(memcg, nr_pages);
memcg_check_events(memcg, newpage);
local_irq_restore(flags);
}
@@ -7204,7 +7203,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
* only synchronisation we have for updating the per-CPU variables.
*/
VM_BUG_ON(!irqs_disabled());
- mem_cgroup_charge_statistics(memcg, page, -nr_entries);
+ mem_cgroup_charge_statistics(memcg, -nr_entries);
memcg_check_events(memcg, page);
css_put(&memcg->css);