Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-25 Thread Daniel Jordan
On Thu, Oct 25, 2018 at 08:54:16AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: > >> +#ifdef CONFIG_THP_SWAP > >> +/* > >> + * The corresponding page table shouldn't be changed under us, that > >> + * is, the page table lock

Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-25 Thread Daniel Jordan
On Thu, Oct 25, 2018 at 08:54:16AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: > >> +#ifdef CONFIG_THP_SWAP > >> +/* > >> + * The corresponding page table shouldn't be changed under us, that > >> + * is, the page table lock

Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-24 Thread Huang, Ying
Daniel Jordan writes: > On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: >> +#ifdef CONFIG_THP_SWAP >> +/* >> + * The corresponding page table shouldn't be changed under us, that >> + * is, the page table lock should be held. >> + */ >> +int split_swap_cluster_map(swp_entry_t entry)

Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-24 Thread Huang, Ying
Daniel Jordan writes: > On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: >> +#ifdef CONFIG_THP_SWAP >> +/* >> + * The corresponding page table shouldn't be changed under us, that >> + * is, the page table lock should be held. >> + */ >> +int split_swap_cluster_map(swp_entry_t entry)

Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-24 Thread Daniel Jordan
On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: > +#ifdef CONFIG_THP_SWAP > +/* > + * The corresponding page table shouldn't be changed under us, that > + * is, the page table lock should be held. > + */ > +int split_swap_cluster_map(swp_entry_t entry) > +{ > + struct

Re: [PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-24 Thread Daniel Jordan
On Wed, Oct 10, 2018 at 03:19:09PM +0800, Huang Ying wrote: > +#ifdef CONFIG_THP_SWAP > +/* > + * The corresponding page table shouldn't be changed under us, that > + * is, the page table lock should be held. > + */ > +int split_swap_cluster_map(swp_entry_t entry) > +{ > + struct

[PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-10 Thread Huang Ying
A huge PMD need to be split when zap a part of the PMD mapping etc. If the PMD mapping is a swap mapping, we need to split it too. This patch implemented the support for this. This is similar as splitting the PMD page mapping, except we need to decrease the PMD swap mapping count for the huge

[PATCH -V6 06/21] swap: Support PMD swap mapping when splitting huge PMD

2018-10-10 Thread Huang Ying
A huge PMD need to be split when zap a part of the PMD mapping etc. If the PMD mapping is a swap mapping, we need to split it too. This patch implemented the support for this. This is similar as splitting the PMD page mapping, except we need to decrease the PMD swap mapping count for the huge