[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48877585-85de-ad4b-6b35-8e6dd24a43c0@ascade.co.jp>
Date: Fri, 18 May 2018 13:32:41 +0900
From: TSUKADA Koutaro <tsukada@...ade.co.jp>
To: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Jonathan Corbet <corbet@....net>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Roman Gushchin <guro@...com>,
David Rientjes <rientjes@...gle.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
Marc-Andre Lureau <marcandre.lureau@...hat.com>,
Punit Agrawal <punit.agrawal@....com>,
Dan Williams <dan.j.williams@...el.com>,
Vlastimil Babka <vbabka@...e.cz>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, cgroups@...r.kernel.org, tsukada@...ade.co.jp
Subject: [PATCH v2 2/7] hugetlb: support migrate charging for surplus
hugepages
Surplus hugepages allocated for migration also charge to memory cgroup.
Signed-off-by: TSUKADA Koutaro <tsukada@...ade.co.jp>
---
hugetlb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 679c151f..2e7b543 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1687,6 +1687,8 @@ static struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask,
if (!page)
return NULL;
+ surplus_hugepage_set_charge(h, page);
+
/*
* We do not account these pages as surplus because they are only
* temporary and will be released properly on the last reference
--
Tsukada
Powered by blists - more mailing lists