[PATCH V5 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-10 Thread Anshuman Khandual
This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validating changes to existing page table helpers or addition of new ones. Test page table and memory pages creati

[PATCH V5 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-10 Thread Anshuman Khandual
This series adds a test validation for architecture exported page table helpers. Patch in the series adds basic transformation tests at various levels of the page table. Before that it exports gigantic page allocation function from HugeTLB. This test was originally suggested by Catalin during arm6

[PATCH V5 1/2] mm/hugetlb: Make alloc_gigantic_page() available for general use

2019-10-10 Thread Anshuman Khandual
alloc_gigantic_page() implements an allocation method where it scans over various zones looking for a large contiguous memory block which could not have been allocated through the buddy allocator. A subsequent patch which tests arch page table helpers needs such a method to allocate PUD_SIZE sized

Re: [PATCH 0/3] eldie generated code for folded p4d/pud

2019-10-10 Thread Vineet Gupta
Hi Kirill, On 10/10/19 1:56 AM, Kirill A. Shutemov wrote: > On Wed, Oct 09, 2019 at 10:26:55PM +, Vineet Gupta wrote: >> >> This series elides extraneous generate code for folded p4d/pud. >> This came up when trying to remove __ARCH_USE_5LEVEL_HACK from ARC port. >> The code saving are not a

Re: [PATCH 0/3] eldie generated code for folded p4d/pud

2019-10-10 Thread Kirill A. Shutemov
On Wed, Oct 09, 2019 at 10:26:55PM +, Vineet Gupta wrote: > Hi, > > This series elides extraneous generate code for folded p4d/pud. > This came up when trying to remove __ARCH_USE_5LEVEL_HACK from ARC port. > The code saving are not a while lot, but still worthwhile IMHO. Agreed. Acked-by: K

Re: [PATCH v3] ARC: mm: remove __ARCH_USE_5LEVEL_HACK

2019-10-10 Thread Kirill A. Shutemov
On Wed, Oct 09, 2019 at 06:57:31PM +, Vineet Gupta wrote: > Add the intermediate p4d accessors to make it 5 level compliant. > > This is a non-functional change anyways since ARC has software page walker > with 2 lookup levels (pgd -> pte) > > There is slight code bloat due to pulling in need

Re: [PATCH 0/3] eldie generated code for folded p4d/pud

2019-10-10 Thread Peter Zijlstra
On Wed, Oct 09, 2019 at 03:26:55PM -0700, Vineet Gupta wrote: > Hi, > > This series elides extraneous generate code for folded p4d/pud. > This came up when trying to remove __ARCH_USE_5LEVEL_HACK from ARC port. > The code saving are not a while lot, but still worthwhile IMHO. > > bloat-o-meter2 v