lkml.org 
[lkml]   [2023]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 2/3] hugetlb: memcg: account hugetlb-backed memory in memory controller (fix)
Date
Ensure hugetlb folio migration also transfers the memcg metadata.

This fixlet should be squashed to the following patch:
https://lore.kernel.org/lkml/20231003001828.2554080-3-nphamcs@gmail.com/
hugetlb: memcg: account hugetlb-backed memory in memory controller

Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Nhat Pham <nphamcs@gmail.com>
---
mm/migrate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 7d1804c4a5d9..6034c7ed1d65 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -633,8 +633,7 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)

folio_copy_owner(newfolio, folio);

- if (!folio_test_hugetlb(folio))
- mem_cgroup_migrate(folio, newfolio);
+ mem_cgroup_migrate(folio, newfolio);
}
EXPORT_SYMBOL(folio_migrate_flags);

--
2.34.1
\
 
 \ /
  Last update: 2023-10-04 21:45    [W:0.224 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site