linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mm: memcg/slab: remove unused argument by charge_slab_page()
@ 2020-07-07 17:36 Roman Gushchin
  2020-07-07 17:36 ` [PATCH 2/3] mm: slab: rename (un)charge_slab_page() to (un)account_slab_page() Roman Gushchin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Roman Gushchin @ 2020-07-07 17:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Michal Hocko, Shakeel Butt, linux-mm,
	Vlastimil Babka, kernel-team, linux-kernel, Roman Gushchin

charge_slab_page() is not using the gfp argument anymore,
remove it.

Signed-off-by: Roman Gushchin <guro@fb.com>
---
 mm/slab.c | 2 +-
 mm/slab.h | 3 +--
 mm/slub.c | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 2850fe3c5fb8..fafd46877504 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1379,7 +1379,7 @@ static struct page *kmem_getpages(struct kmem_cache *cachep, gfp_t flags,
 		return NULL;
 	}
 
-	charge_slab_page(page, flags, cachep->gfporder, cachep);
+	charge_slab_page(page, cachep->gfporder, cachep);
 	__SetPageSlab(page);
 	/* Record if ALLOC_NO_WATERMARKS was set when allocating the slab */
 	if (sk_memalloc_socks() && page_is_pfmemalloc(page))
diff --git a/mm/slab.h b/mm/slab.h
index ab172dca8ce2..704a65713f81 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -440,8 +440,7 @@ static inline struct kmem_cache *virt_to_cache(const void *obj)
 	return page->slab_cache;
 }
 
-static __always_inline void charge_slab_page(struct page *page,
-					     gfp_t gfp, int order,
+static __always_inline void charge_slab_page(struct page *page, int order,
 					     struct kmem_cache *s)
 {
 	mod_node_page_state(page_pgdat(page), cache_vmstat_idx(s),
diff --git a/mm/slub.c b/mm/slub.c
index 6769f5f802e9..d9b33a935e58 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1621,7 +1621,7 @@ static inline struct page *alloc_slab_page(struct kmem_cache *s,
 		page = __alloc_pages_node(node, flags, order);
 
 	if (page)
-		charge_slab_page(page, flags, order, s);
+		charge_slab_page(page, order, s);
 
 	return page;
 }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-08 11:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 17:36 [PATCH 1/3] mm: memcg/slab: remove unused argument by charge_slab_page() Roman Gushchin
2020-07-07 17:36 ` [PATCH 2/3] mm: slab: rename (un)charge_slab_page() to (un)account_slab_page() Roman Gushchin
2020-07-07 17:51   ` Shakeel Butt
2020-07-08 11:16   ` Vlastimil Babka
2020-07-07 17:36 ` [PATCH 3/3] mm: kmem: switch to static_branch_likely() in memcg_kmem_enabled() Roman Gushchin
2020-07-07 17:52   ` Shakeel Butt
2020-07-08 11:17   ` Vlastimil Babka
2020-07-07 17:50 ` [PATCH 1/3] mm: memcg/slab: remove unused argument by charge_slab_page() Shakeel Butt
2020-07-08 11:16 ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).