Skip to contentSkip to conversation

mm/memcontrol: support MEMORY_DEVICE_PRIVATE

PATCH New [email protected] 1 participant 1 message Sep 8, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 20/126 mm/memcontrol: support MEMORY_DEVICE_PRIVATE

From: Jérôme Glisse <[email protected]>
Subject: mm/memcontrol: support MEMORY_DEVICE_PRIVATE

HMM pages (private or public device pages) are ZONE_DEVICE page and thus need special handling when it comes to lru or refcount. This patch make sure that memcontrol properly handle those when it face them. Those pages are use like regular pages in a process address space either as anonymous page or as file back page. So from memcg point of view we want to handle them like regular page for now at least.

Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Vladimir Davydov <[email protected]>
Cc Aneesh Kumar <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Dan Williams <[email protected]>
Cc David Nellans <[email protected]>
Cc Evgeny Baskakov <[email protected]>
Cc John Hubbard <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Mark Hairgrove <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Ross Zwisler <[email protected]>
Cc Sherry Cheung <[email protected]>
Cc Subhash Gutti <[email protected]>
Cc Bob Liu <[email protected]>

---

 kernel/memremap.c |    1 
 mm/memcontrol.c   |   52 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 49 insertions(+), 4 deletions(-)
kernel/memremap.c renamed from kernel/memremap.c~mm-memcontrol-support-memory_device_private-v4 +1 -0
diff -puN kernel/memremap.c~mm-memcontrol-support-memory_device_private-v4 kernel/memremap.c
@@ -516,6 +516,7 @@ void put_zone_device_private_page(struct
 		__ClearPageWaiters(page);
 
 		page->mapping = NULL;
+		mem_cgroup_uncharge(page);
 
 		page->pgmap->page_free(page, page->pgmap->data);
 	} else if (!count)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcontrol-support-memory_device_private-v4 +48 -4

123 lines not on this page · raw message

_