summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVishal Moola (Oracle) <vishal.moola@gmail.com>2023-10-20 11:33:30 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-01 01:58:25 +0100
commita1afee6c6f5366949761afd0d52e3d8142a42e2c (patch)
treeca9d3d5e624c1a19fefceb529f6ee9898ac551a5 /include
parentcf2bb1bf03068504f5c216194df57c23ed0bed5a (diff)
downloadlinux-a1afee6c6f5366949761afd0d52e3d8142a42e2c.tar.gz
linux-a1afee6c6f5366949761afd0d52e3d8142a42e2c.tar.bz2
linux-a1afee6c6f5366949761afd0d52e3d8142a42e2c.zip
mm/khugepaged: convert alloc_charge_hpage() to use folios
[ Upstream commit b455f39d228935f88eebcd1f7c1a6981093c6a3b ] Also remove count_memcg_page_event now that its last caller no longer uses it and reword hpage_collapse_alloc_page() to hpage_collapse_alloc_folio(). This removes 1 call to compound_head() and helps convert khugepaged to use folios throughout. Link: https://lkml.kernel.org/r/20231020183331.10770-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> Reviewed-by: Rik van Riel <riel@surriel.com> Reviewed-by: Yang Shi <shy828301@gmail.com> Cc: Kefeng Wang <wangkefeng.wang@huawei.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Stable-dep-of: 37f0b47c5143 ("mm: khugepaged: fix the arguments order in khugepaged_collapse_file trace point") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/memcontrol.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e4e24da16d2c..b1fdb1554f2f 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1080,15 +1080,6 @@ static inline void count_memcg_events(struct mem_cgroup *memcg,
local_irq_restore(flags);
}
-static inline void count_memcg_page_event(struct page *page,
- enum vm_event_item idx)
-{
- struct mem_cgroup *memcg = page_memcg(page);
-
- if (memcg)
- count_memcg_events(memcg, idx, 1);
-}
-
static inline void count_memcg_folio_events(struct folio *folio,
enum vm_event_item idx, unsigned long nr)
{
@@ -1565,11 +1556,6 @@ static inline void __count_memcg_events(struct mem_cgroup *memcg,
{
}
-static inline void count_memcg_page_event(struct page *page,
- int idx)
-{
-}
-
static inline void count_memcg_folio_events(struct folio *folio,
enum vm_event_item idx, unsigned long nr)
{