Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-17 Thread Michael Ellerman
Matthew Wilcox writes: > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: >> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: >> > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> > __GFP_ZERO) and using it for allocating page table pages. This causes

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Matthew Wilcox
On Wed, Jan 16, 2019 at 02:47:16PM +0100, Christophe Leroy wrote: > Le 16/01/2019 à 14:18, Matthew Wilcox a écrit : > > I disagree with your objective. Making more code common is a great idea, > > but this patch is too unambitious. We should be heading towards one or > > two page table allocation

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Christophe Leroy
Le 16/01/2019 à 14:18, Matthew Wilcox a écrit : On Wed, Jan 16, 2019 at 06:42:22PM +0530, Anshuman Khandual wrote: On 01/16/2019 06:00 PM, Matthew Wilcox wrote: On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: All architecture

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Michal Hocko
On Wed 16-01-19 18:57:13, Anshuman Khandual wrote: > > > On 01/16/2019 06:14 PM, Michal Hocko wrote: > > On Wed 16-01-19 04:30:18, Matthew Wilcox wrote: > >> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > >>> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > All architect

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Michal Hocko
On Wed 16-01-19 05:18:27, Matthew Wilcox wrote: > On Wed, Jan 16, 2019 at 06:42:22PM +0530, Anshuman Khandual wrote: > > On 01/16/2019 06:00 PM, Matthew Wilcox wrote: > > > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > > >> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > > >>

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Anshuman Khandual
On 01/16/2019 06:14 PM, Michal Hocko wrote: > On Wed 16-01-19 04:30:18, Matthew Wilcox wrote: >> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: >>> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Matthew Wilcox
On Wed, Jan 16, 2019 at 06:42:22PM +0530, Anshuman Khandual wrote: > On 01/16/2019 06:00 PM, Matthew Wilcox wrote: > > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > >> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > >>> All architectures have been defining their own PGALLOC_G

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Anshuman Khandual
On 01/16/2019 06:00 PM, Matthew Wilcox wrote: > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: >> On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: >>> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >>> __GFP_ZERO) and using it for allocating page tab

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Anshuman Khandual
On 01/16/2019 12:25 PM, Mike Rapoport wrote: > On Wed, Jan 16, 2019 at 11:51:32AM +0530, Anshuman Khandual wrote: >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> __GFP_ZERO) and using it for allocating page table pages. This causes some >> code duplication which

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Michal Hocko
On Wed 16-01-19 04:30:18, Matthew Wilcox wrote: > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > > On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > > > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL > > > | > > > __GFP_ZERO) and using it for allocati

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Anshuman Khandual
On 01/16/2019 12:40 PM, Christophe Leroy wrote: > > > Le 16/01/2019 à 07:21, Anshuman Khandual a écrit : >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> __GFP_ZERO) and using it for allocating page table pages. This causes some >> code duplication which can be

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Peter Zijlstra
On Wed, Jan 16, 2019 at 04:30:18AM -0800, Matthew Wilcox wrote: > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > > On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > > > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL > > > | > > > __GFP_ZERO) and using

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-16 Thread Matthew Wilcox
On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > > __GFP_ZERO) and using it for allocating page table pages. This causes some > > code duplication whic

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Christophe Leroy
Le 16/01/2019 à 07:21, Anshuman Khandual a écrit : All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | __GFP_ZERO) and using it for allocating page table pages. This causes some code duplication which can be easily avoided. GFP_KERNEL allocated and cleared out pages (__

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Michal Hocko
On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > __GFP_ZERO) and using it for allocating page table pages. This causes some > code duplication which can be easily avoided. GFP_KERNEL allocated and > cleared out pages

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Mike Rapoport
On Wed, Jan 16, 2019 at 11:51:32AM +0530, Anshuman Khandual wrote: > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > __GFP_ZERO) and using it for allocating page table pages. This causes some > code duplication which can be easily avoided. GFP_KERNEL allocated and > cl

[PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Anshuman Khandual
All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | __GFP_ZERO) and using it for allocating page table pages. This causes some code duplication which can be easily avoided. GFP_KERNEL allocated and cleared out pages (__GFP_ZERO) are required for page tables on any given arch