On 2018/05/24 22:24, Michal Hocko wrote [...]> I do not see anything like that. adjust_pool_surplus is simply and > accounting thing. At least the last time I've checked. Maybe your > patchset handles that? As you said, my patch did not consider handling when manipulating the pool. And even if that handling is done well, it will not be a valid reason to charge surplus hugepage to memcg. [...] >> Absolutely you are saying the right thing, but, for example, can mlock(2)ed >> pages be swapped out by reclaim?(What is the difference between mlock(2)ed >> pages and hugetlb page?) > > No mlocked pages cannot be reclaimed and that is why we restrict them to > a relatively small amount. I understood the concept of memcg. [...] > Fatal? Not sure. It simply tries to add an alien memory to the memcg > concept so I would pressume an unexpected behavior (e.g. not being able > to reclaim memcg or, over reclaim, trashing etc.). As you said, it must be an alien. Thanks to the interaction up to here, I understood that my solution is inappropriate. I will look for another way. Thank you for your kind explanation. -- Thanks, Tsukada