Re: [PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-07-10 Thread Daniel Jordan
On Tue, Jul 10, 2018 at 03:49:58PM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Fri, Jun 22, 2018 at 11:51:44AM +0800, Huang, Ying wrote: > >> Because there is no way to prevent a huge swap cluster from being > >> split except when it has SWAP_HAS_CACHE flag set. > > > > What about

Re: [PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-07-10 Thread Huang, Ying
Daniel Jordan writes: > On Fri, Jun 22, 2018 at 11:51:44AM +0800, Huang, Ying wrote: >> Because there is no way to prevent a huge swap cluster from being >> split except when it has SWAP_HAS_CACHE flag set. > > What about making get_mctgt_type_thp take the cluster lock? That function > would be

Re: [PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-07-09 Thread Daniel Jordan
On Fri, Jun 22, 2018 at 11:51:44AM +0800, Huang, Ying wrote: > Because there is no way to prevent a huge swap cluster from being > split except when it has SWAP_HAS_CACHE flag set. What about making get_mctgt_type_thp take the cluster lock? That function would be the first lock_cluster user outsi

[PATCH -mm -v4 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-06-21 Thread Huang, Ying
From: Huang Ying Previously the huge swap cluster will be split after the THP is swapout. Now, to support to swapin the THP as a whole, the huge swap cluster will not be split after the THP is reclaimed. So in memcg, we need to move the swap account for PMD swap mappings in the process's page t