From c733a82874a79261866a4178edbb608847df4879 Mon Sep 17 00:00:00 2001 From: Jérôme Glisse Date: Fri, 8 Sep 2017 16:11:54 -0700 Subject: mm/memcontrol: support MEMORY_DEVICE_PRIVATE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Link: http://lkml.kernel.org/r/20170817000548.32038-11-jglisse@redhat.com Signed-off-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Aneesh Kumar Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: David Nellans Cc: Evgeny Baskakov Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Mark Hairgrove Cc: Paul E. McKenney Cc: Ross Zwisler Cc: Sherry Cheung Cc: Subhash Gutti Cc: Bob Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/memremap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel') diff --git a/kernel/memremap.c b/kernel/memremap.c index 1403cf16fa61..ea0e18a2a5f2 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -516,6 +516,7 @@ void put_zone_device_private_page(struct page *page) __ClearPageWaiters(page); page->mapping = NULL; + mem_cgroup_uncharge(page); page->pgmap->page_free(page, page->pgmap->data); } else if (!count) -- cgit v1.2.3