Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-03-08 Thread Yu Zhao
On Tue, Feb 26, 2019 at 03:12:31PM +, Mark Rutland wrote: > Hi, > > On Mon, Feb 18, 2019 at 04:13:17PM -0700, Yu Zhao wrote: > > For pte page, use pgtable_page_ctor(); for pmd page, use > > pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > > p4d and pgd), don't use any. > > > >

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-26 Thread Mark Rutland
Hi, On Mon, Feb 18, 2019 at 04:13:17PM -0700, Yu Zhao wrote: > For pte page, use pgtable_page_ctor(); for pmd page, use > pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > p4d and pgd), don't use any. > > Signed-off-by: Yu Zhao > --- > arch/arm64/mm/mmu.c | 33

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-20 Thread Matthew Wilcox
On Mon, Feb 18, 2019 at 10:32:05PM -0700, Yu Zhao wrote: > pgtable_pmd_page_ctor() must be used on user pmd. For kernel pmd, > it's okay to use pgtable_page_ctor() instead only because kernel > doesn't have thp. I'm not sure that's true. I think you can create THPs in vmalloc these days. See HAV

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-20 Thread Matthew Wilcox
On Wed, Feb 20, 2019 at 01:22:44PM -0700, Yu Zhao wrote: > On Wed, Feb 20, 2019 at 03:57:59PM +0530, Anshuman Khandual wrote: > > Using pgtable_pmd_page_ctor() during PMD level pgtable page allocation > > as suggested in the patch breaks pmd_alloc_one() changes as per the > > previous proposal. Hen

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-20 Thread Yu Zhao
On Wed, Feb 20, 2019 at 03:57:59PM +0530, Anshuman Khandual wrote: > > > On 02/20/2019 03:58 AM, Yu Zhao wrote: > > On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: > >> + Matthew Wilcox > >> > >> On 02/19/2019 11:02 AM, Yu Zhao wrote: > >>> On Tue, Feb 19, 2019 at 09:51:01AM +0

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-20 Thread Matthew Wilcox
On Wed, Feb 20, 2019 at 03:57:59PM +0530, Anshuman Khandual wrote: > On 02/20/2019 03:58 AM, Yu Zhao wrote: > > On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: > >> On 02/19/2019 11:02 AM, Yu Zhao wrote: > >>> On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: > >

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-20 Thread Anshuman Khandual
On 02/20/2019 03:58 AM, Yu Zhao wrote: > On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: >> + Matthew Wilcox >> >> On 02/19/2019 11:02 AM, Yu Zhao wrote: >>> On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: On 02/19/2019 04:43 AM, Yu Zhao wrote

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-19 Thread Anshuman Khandual
On 02/20/2019 07:04 AM, Matthew Wilcox wrote: > On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: >> + Matthew Wilcox >> On 02/19/2019 11:02 AM, Yu Zhao wrote: >>> On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: On 02/19/2019 04:43 AM, Yu Zhao w

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-19 Thread Matthew Wilcox
On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: > + Matthew Wilcox > On 02/19/2019 11:02 AM, Yu Zhao wrote: > > On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: > >> > >> > >> On 02/19/2019 04:43 AM, Yu Zhao wrote: > >>> For pte page, use pgtable_page_ctor(); fo

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-19 Thread Yu Zhao
On Tue, Feb 19, 2019 at 11:47:12AM +0530, Anshuman Khandual wrote: > + Matthew Wilcox > > On 02/19/2019 11:02 AM, Yu Zhao wrote: > > On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: > >> > >> > >> On 02/19/2019 04:43 AM, Yu Zhao wrote: > >>> For pte page, use pgtable_page_ctor();

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-18 Thread Anshuman Khandual
+ Matthew Wilcox On 02/19/2019 11:02 AM, Yu Zhao wrote: > On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: >> >> >> On 02/19/2019 04:43 AM, Yu Zhao wrote: >>> For pte page, use pgtable_page_ctor(); for pmd page, use >>> pgtable_pmd_page_ctor() if not folded; and for the rest (pud

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-18 Thread Yu Zhao
On Tue, Feb 19, 2019 at 09:51:01AM +0530, Anshuman Khandual wrote: > > > On 02/19/2019 04:43 AM, Yu Zhao wrote: > > For pte page, use pgtable_page_ctor(); for pmd page, use > > pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > > p4d and pgd), don't use any. > pgtable_page_ctor()/dto

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-18 Thread Anshuman Khandual
On 02/19/2019 04:43 AM, Yu Zhao wrote: > For pte page, use pgtable_page_ctor(); for pmd page, use > pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > p4d and pgd), don't use any. pgtable_page_ctor()/dtor() is not optional for any level page table page as it determines the struct pa

[PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-02-18 Thread Yu Zhao
For pte page, use pgtable_page_ctor(); for pmd page, use pgtable_pmd_page_ctor() if not folded; and for the rest (pud, p4d and pgd), don't use any. Signed-off-by: Yu Zhao --- arch/arm64/mm/mmu.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git