[PATCH V5 3/4] mm/debug_vm_pgtable: Add debug prints for individual tests

2020-07-12 Thread Anshuman Khandual
.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 46 ++- 1 file changed, 45 insertions(+), 1 deletion(-)

[PATCH V5 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers

2020-07-12 Thread Anshuman Khandual
: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandua

[PATCH V5 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-07-12 Thread Anshuman Khandual
nel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Reviewed-by: Zi Yan Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtab

[PATCH V5 0/4] mm/debug_vm_pgtable: Add some more tests

2020-07-12 Thread Anshuman Khandual
g Cc: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (4): mm/debug_vm_pgtable: Add tests validatin

Re: [PATCH v2] mm/hugetlb: split hugetlb_cma in nodes with memory

2020-07-10 Thread Anshuman Khandual
gt; Cc: Will Deacon > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: H. Peter Anvin > Cc: Mike Kravetz > Cc: Mike Rapoport > Cc: Andrew Morton > Cc: Anshuman Khandual > Cc: Jonathan Cameron > Signed-off-by: Barry Song > --- > -v2:

Re: [mm/debug_vm_pgtable] a97a171093: BUG:unable_to_handle_page_fault_for_address

2020-07-10 Thread Anshuman Khandual
On 07/09/2020 11:41 AM, kernel test robot wrote: > [ 94.349598] BUG: unable to handle page fault for address: ed10a7ffddff > [ 94.351039] #PF: supervisor read access in kernel mode > [ 94.352172] #PF: error_code(0x) - not-present page > [ 94.353256] PGD 43ffed067 P4D 43ffed067

Re: [PATCH V4] mm/vmstat: Add events for THP migration without split

2020-07-09 Thread Anshuman Khandual
. >>>> >>>> a. I reported it very early and should have been Cc-ed. >>>> >>>> b. A patch that applies to mmotm or linux-next would have been better >>>> than a full replacement patch. >>>> >>>> c. I tried replacing

Re: [PATCH V4] mm/vmstat: Add events for THP migration without split

2020-07-09 Thread Anshuman Khandual
On 07/09/2020 09:04 PM, Randy Dunlap wrote: > Hi, > > I have a few comments on this. > > a. I reported it very early and should have been Cc-ed. I should have Cc-ed you on this V4 patch, sorry about that. > > b. A patch that applies to mmotm or linux-next would have been better > than a

[PATCH V4] mm/vmstat: Add events for THP migration without split

2020-07-09 Thread Anshuman Khandual
Wilcox Cc: Zi Yan Cc: John Hubbard Cc: Naoya Horiguchi Cc: Andrew Morton Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Zi Yan Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc4. Changes in V4: - Changed THP_MIGRATION_FAILURE

Re: mmotm 2020-07-08-19-28 uploaded (mm/migrate.c)

2020-07-08 Thread Anshuman Khandual
On 07/09/2020 09:17 AM, Randy Dunlap wrote: > On 7/8/20 7:29 PM, Andrew Morton wrote: >> The mm-of-the-moment snapshot 2020-07-08-19-28 has been uploaded to >> >>http://www.ozlabs.org/~akpm/mmotm/ >> >> mmotm-readme.txt says >> >> README for mm-of-the-moment: >> >>

Re: [PATCH v2] vmalloc: Removing incorrect logs when vmalloc failed

2020-07-08 Thread Anshuman Khandual
On 07/09/2020 06:44 AM, Tian Tao wrote: > It is not possible to increase size with vmalloc= in arm64 Small nit. s/in arm64/on arm64/ In fact "vmalloc=" cmdline option is not available on many platforms. Hence it is not something arm64 specific here, it is a general problem. > architecture

Re: [PATCH V4 0/3] arm64: Enable vmemmap mapping from device memory

2020-07-08 Thread Anshuman Khandual
On 07/06/2020 08:26 AM, Anshuman Khandual wrote: > This series enables vmemmap backing memory allocation from device memory > ranges on arm64. But before that, it enables vmemmap_populate_basepages() > and vmemmap_alloc_block_buf() to accommodate struct vmem_altmap based > alocat

Re: [PATCH V3] mm/vmstat: Add events for THP migration without split

2020-07-08 Thread Anshuman Khandual
On 07/08/2020 05:31 AM, John Hubbard wrote: > On 2020-07-06 17:06, Anshuman Khandual wrote: >> Add following new vmstat events which will help in validating THP migration >> without split. Statistics reported through these new VM events will help in >> performan

Re: [PATCH -next] Documentation/vm: fix tables in arch_pgtable_helpers

2020-07-08 Thread Anshuman Khandual
On 07/08/2020 06:37 AM, Randy Dunlap wrote: > From: Randy Dunlap > > Make the tables be presented as tables in the generated output files > (the line drawing did not present well). > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org

Re: [PATCH -next] Documentation/vm: fix tables in arch_pgtable_helpers

2020-07-07 Thread Anshuman Khandual
On 07/08/2020 07:36 AM, Randy Dunlap wrote: > On 7/7/20 6:22 PM, Anshuman Khandual wrote: >> >> >> On 07/08/2020 06:37 AM, Randy Dunlap wrote: >>> From: Randy Dunlap >>> >>> Make the tables be presented as tables in the generated output

Re: [PATCH] mm/hugetlb: split hugetlb_cma in nodes with memory

2020-07-07 Thread Anshuman Khandual
gigantic hugepages > using cma") I would not call this a "Fix". The current code still works, though in a sub optimal manner. > Cc: Roman Gushchin > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov >

Re: [PATCH -next] Documentation/vm: fix tables in arch_pgtable_helpers

2020-07-07 Thread Anshuman Khandual
On 07/08/2020 06:37 AM, Randy Dunlap wrote: > From: Randy Dunlap > > Make the tables be presented as tables in the generated output files > (the line drawing did not present well). > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org

[PATCH V3] arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[]

2020-07-07 Thread Anshuman Khandual
: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mark Brown Cc: Mark Rutland Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc4. Changes in V3: - Moved around some local

Re: [PATCH] vmalloc: Removing incorrect logs when vmalloc failed

2020-07-07 Thread Anshuman Khandual
On 07/07/2020 02:43 PM, Tian Tao wrote: > It is not possible to increase size with vmalloc= in arm64 > architecture and it will mislead.however vmalloc return failure > is a rare occurrence in 'many architectures including arm64'. But there is a chance that vmalloc() might work on

Re: [PATCH V4 1/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages()

2020-07-06 Thread Anshuman Khandual
On 07/06/2020 02:33 PM, David Hildenbrand wrote: >> return 0; >> @@ -1505,7 +1505,7 @@ int __meminit vmemmap_populate(unsigned long start, >> unsigned long end, int node, >> int err; >> >> if (end - start < PAGES_PER_SECTION * sizeof(struct page)) >> -err =

[PATCH V3] mm/vmstat: Add events for THP migration without split

2020-07-06 Thread Anshuman Khandual
Horiguchi Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Zi Yan Signed-off-by: Anshuman Khandual --- Changes in V3: - Formatted new events documentation with 'fmt' tool per Matthew - Made events universally available i.e dropped ARCH_ENABLE_THP_MIGRATION

Re: [RFC V2 1/2] arm64/mm: Change THP helpers per generic memory semantics

2020-07-05 Thread Anshuman Khandual
On 07/02/2020 05:41 PM, Catalin Marinas wrote: > Hi Anshuman, Hi Catalin, > > On Mon, Jun 15, 2020 at 06:45:17PM +0530, Anshuman Khandual wrote: >> --- a/arch/arm64/include/asm/pgtable.h >> +++ b/arch/arm64/include/asm/pgtable.h >> @@ -353,15 +353,92 @@ static in

[PATCH V4 3/3] arm64/mm: Enable vmem_altmap support for vmemmap mappings

2020-07-05 Thread Anshuman Khandual
Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 58 + 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 9c08d1882106..51a1b0e886ff 100644 --- a/arch/arm64/mm/mmu.c +++ b

[PATCH V4 0/3] arm64: Enable vmemmap mapping from device memory

2020-07-05 Thread Anshuman Khandual
nel.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages() mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf() arm64/mm: Enable vmem_altmap support

[PATCH V4 2/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf()

2020-07-05 Thread Anshuman Khandual
ead.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Tested-by: Jia He Suggested-by: Robin Murphy Signed-off-by: Anshuman Khandual --- Documentation/vm/memory-model.rst | 2 +- arch/arm64/mm/mmu.c | 2 +- arch/powerpc/mm/init_64.c | 4

[PATCH V4 1/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages()

2020-07-05 Thread Anshuman Khandual
rnel@vger.kernel.org Tested-by: Jia He Acked-by: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 2 +- arch/ia64/mm/discontig.c | 2 +- arch/riscv/mm/init.c | 2 +- arch/x86/mm/init_64.c| 6 +++--- include/linux/mm.h | 5 +++--

Re: [PATCH V4 0/4] mm/debug_vm_pgtable: Add some more tests

2020-07-05 Thread Anshuman Khandual
On 07/06/2020 06:18 AM, Anshuman Khandual wrote: > This series adds some more arch page table helper validation tests which > are related to core and advanced memory functions. This also creates a > documentation, enlisting expected semantics for all page table helpers as > sugge

[PATCH V4 0/4] mm/debug_vm_pgtable: Add some more tests

2020-07-05 Thread Anshuman Khandual
g Cc: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-...@vger.kernel.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (4): mm/debug_vm_pgtable: Add tests validatin

[PATCH V4 3/4] mm/debug_vm_pgtable: Add debug prints for individual tests

2020-07-05 Thread Anshuman Khandual
Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 46 ++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/mm/debug_vm_pgta

[PATCH V4 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers

2020-07-05 Thread Anshuman Khandual
c: linux-s...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtab

[PATCH V4 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-07-05 Thread Anshuman Khandual
.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Vineet Gupta#arc Reviewed-by: Zi Yan Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 302

[PATCH V4 4/4] Documentation/mm: Add descriptions for arch page table helpers

2020-07-05 Thread Anshuman Khandual
Cc: linux...@kvack.org Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Mike Rapoport Suggested-by: Mike Rapoport Signed-off-by: Anshuman Khandual --- Documentation/vm/arch_pgtable_helpers.rst | 258 ++ mm/debug_vm_pgtable.c | 6 + 2 fil

Re: [PATCH V5 0/4] arm64/cpufeature: Introduce ID_PFR2, ID_DFR1, ID_MMFR5 and other changes

2020-07-03 Thread Anshuman Khandual
On 07/02/2020 11:04 PM, Catalin Marinas wrote: > On Wed, May 27, 2020 at 08:33:35AM +0530, Anshuman Khandual wrote: >> These are remaining patches from V4 series which had some pending reviews >> from Suzuki (https://patchwork.kernel.org/cover/11557333/). Also dropped

Re: [PATCH V3 (RESEND) 2/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf()

2020-07-03 Thread Anshuman Khandual
On 07/02/2020 07:37 PM, Catalin Marinas wrote: > On Thu, Jun 18, 2020 at 06:45:29AM +0530, Anshuman Khandual wrote: >> There are many instances where vmemap allocation is often switched between >> regular memory and device memory just based on whether altm

[PATCH V5 (RESEND) 4/4] arm64/cpufeature: Replace all open bits shift encodings with macros

2020-07-02 Thread Anshuman Khandual
Cc: James Morse Cc: Suzuki K Poulose Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 28 + arch/arm64/kernel/cpufeature.c | 53

[PATCH V5 (RESEND) 3/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR2 register

2020-07-02 Thread Anshuman Khandual
-by: Will Deacon Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 7 +++ arch/arm64/kernel/cpufeature.c | 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 889fa7729719

[PATCH V5 (RESEND) 2/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register

2020-07-02 Thread Anshuman Khandual
Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 4 arch/arm64/kernel/cpufeature.c | 4 2 files changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 2e36dfde2570..889fa7729719 100644

[PATCH V5 (RESEND) 1/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register

2020-07-02 Thread Anshuman Khandual
K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 3 +++ arch/arm64/kernel/cpufeature.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 463175f80341..2e36dfde2570 100644 --- a/arch

[PATCH V5 (RESEND) 0/4] arm64/cpufeature: Introduce ID_PFR2, ID_DFR1, ID_MMFR5 and other changes

2020-07-02 Thread Anshuman Khandual
FTR_STRICT -> FTR_NONSTRICT) as 64 bit registers per Will - Changed ID_PFR0.CSV2 (FTR_STRICT -> FTR_NONSTRICT) as 64 bit registers per Will - Changed some commit messages Changes in V1: (https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=234093) Anshuman Khandual (4):

[PATCH V2] arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[]

2020-06-30 Thread Anshuman Khandual
: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mark Brown Cc: Mark Rutland Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc3. Changes in V2: - Replaced WARN_ON() with WARN() dropping the conditional block

[PATCH V3] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs

2020-06-30 Thread Anshuman Khandual
and hence cannot contain stub for the inverse config i.e !(CONFIG_HUGETLB_PAGE && CONFIG_CMA). Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Mike Kravetz Cc: Barry Song Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by:

Re: [PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-29 Thread Anshuman Khandual
On 06/24/2020 08:43 AM, Anshuman Khandual wrote: > > > On 06/15/2020 09:07 AM, Anshuman Khandual wrote: >> This series adds some more arch page table helper validation tests which >> are related to core and advanced memory functions. This also creates a >> docume

Re: [PATCH] arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[]

2020-06-29 Thread Anshuman Khandual
On 06/29/2020 04:12 PM, Suzuki K Poulose wrote: > On 06/16/2020 03:25 AM, Anshuman Khandual wrote: >> arm64_feature_bits for a register in arm64_ftr_regs[] are in a descending >> order as per their shift values. Validate that these features bits are >> defined correct

Re: [PATCH V3 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers

2020-06-29 Thread Anshuman Khandual
On 06/27/2020 12:48 PM, Christophe Leroy wrote: > Le 15/06/2020 à 05:37, Anshuman Khandual a écrit : >> This adds new tests validating for these following arch advanced page table >> helpers. These tests create and test specific mapping types at various page >>

Re: [PATCH V3 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers

2020-06-29 Thread Anshuman Khandual
On 06/27/2020 12:56 PM, Christophe Leroy wrote: > > > Le 15/06/2020 à 05:37, Anshuman Khandual a écrit : >> This adds new tests validating for these following arch advanced page table >> helpers. These tests create and test specific mapping types at various page >

[PATCH V3] arm64/panic: Unify all three existing notifier blocks

2020-06-29 Thread Anshuman Khandual
-by: Mark Rutland Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc3. Changes in V3: - Updated the commit message per Mark Changes in V2: (https://patchwork.kernel.org/patch/11619601/) - Replaced __initcall() directly with device_initcall() - Added static for dump_kernel_offset() Changes

Re: [PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-29 Thread Anshuman Khandual
On 06/24/2020 08:10 PM, Alexander Gordeev wrote: > On Wed, Jun 24, 2020 at 01:48:08PM +0200, Gerald Schaefer wrote: >> On Wed, 24 Jun 2020 13:05:39 +0200 >> Alexander Gordeev wrote: >> >>> On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: >&

[PATCH V2] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs

2020-06-29 Thread Anshuman Khandual
Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc3. Changes in V2: - Moved arm64_hugetlb_cma_reserve() stub and declaration near call site Changes in V1: (https://patchwork.kernel.org/patch/11619839

Re: [PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-23 Thread Anshuman Khandual
On 06/15/2020 09:07 AM, Anshuman Khandual wrote: > This series adds some more arch page table helper validation tests which > are related to core and advanced memory functions. This also creates a > documentation, enlisting expected semantics for all page table helpers as > sugge

[PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs

2020-06-23 Thread Anshuman Khandual
Cc: Andrew Morton Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc2. arch/arm64/include/asm/hugetlb.h | 8 arch/arm64/mm/hugetlbpage.c | 38 ++ arch/arm64/mm/init.c

[PATCH V2] arm64/panic: Unify all three existing notifier blocks

2020-06-21 Thread Anshuman Khandual
() instead of __initcall(). Cc: Catalin Marinas Cc: Will Deacon Cc: Steve Capper Cc: Mark Rutland Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc2. Changes in V2: - Replaced __initcall() directly with device_initcall

Re: [PATCH] mm/debug_vm_pgtable: Fix build failure with powerpc 8xx

2020-06-19 Thread Anshuman Khandual
platforms after applying the previous series which adds ptep_get() and a follow up patch. https://patchwork.kernel.org/project/linux-mm/list/?series=302949 https://patchwork.kernel.org/patch/11611929/ Build tested on s390 and arc platforms as well. Reviewed-by: Anshuman Khandual

Re: [PATCH V3 (RESEND) 0/3] arm64: Enable vmemmap mapping from device memory

2020-06-18 Thread Anshuman Khandual
On 06/18/2020 02:26 PM, Mike Rapoport wrote: > On Thu, Jun 18, 2020 at 06:45:27AM +0530, Anshuman Khandual wrote: >> This series enables vmemmap backing memory allocation from device memory >> ranges on arm64. But before that, it enables vmemmap_pop

[PATCH V3 (RESEND) 1/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages()

2020-06-17 Thread Anshuman Khandual
rnel@vger.kernel.org Tested-by: Jia He Acked-by: Will Deacon Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 2 +- arch/ia64/mm/discontig.c | 2 +- arch/riscv/mm/init.c | 2 +- arch/x86/mm/init_64.c| 6 +++--- include/linux/mm.h | 5 +++-- mm/sparse

[PATCH V3 (RESEND) 0/3] arm64: Enable vmemmap mapping from device memory

2020-06-17 Thread Anshuman Khandual
ckerras Cc: Michael Ellerman Cc: linux-arm-ker...@lists.infradead.org Cc: linux-i...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (3): mm/sparsemem: Enable

[PATCH V3 (RESEND) 2/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf()

2020-06-17 Thread Anshuman Khandual
ton Cc: x...@kernel.org Cc: linux-arm-ker...@lists.infradead.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Tested-by: Jia He Suggested-by: Robin Murphy Signed-off-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 3 ++- arch/powerpc/mm/init

[PATCH V3 (RESEND) 3/3] arm64/mm: Enable vmem_altmap support for vmemmap mappings

2020-06-17 Thread Anshuman Khandual
-by: Anshuman Khandual --- arch/arm64/mm/mmu.c | 58 + 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 7ca21adb4412..f2ad5b94a235 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -759,15

Re: [PATCH v2] arm64: mm: reserve hugetlb CMA after numa_init

2020-06-16 Thread Anshuman Khandual
; > > arm64_numa_init(); > + > +#ifdef CONFIG_ARM64_4K_PAGES > + hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT); > +#endif arm64_numa_init() calls numa_init() which initializes node_online_map that gets used in hugetlb_cma_reserve() while allocating required CMA size across online nodes. Reviewed-by: Anshuman Khandual

Re: [PATCH] arm64/panic: Unify all three existing notifier blocks

2020-06-16 Thread Anshuman Khandual
; url: > https://github.com/0day-ci/linux/commits/Anshuman-Khandual/arm64-panic-Unify-all-three-existing-notifier-blocks/20200616-11 > base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git > for-next/core > config: arm64-allyesconfig (attached as .config) &g

Re: [PATCH] mm/pgtable: Move extern zero_pfn outside __HAVE_COLOR_ZERO_PAGE

2020-06-16 Thread Anshuman Khandual
On 06/16/2020 01:09 PM, David Hildenbrand wrote: > On 16.06.20 06:08, Anshuman Khandual wrote: >> zero_pfn variable is required whether __HAVE_COLOR_ZERO_PAGE is enabled > > Why is that relevant for this patch? That just states how it is organized right now wrt __HAVE_

Re: [PATCH] mm/pgtable: Move extern zero_pfn outside __HAVE_COLOR_ZERO_PAGE

2020-06-15 Thread Anshuman Khandual
On 06/16/2020 09:38 AM, Anshuman Khandual wrote: > zero_pfn variable is required whether __HAVE_COLOR_ZERO_PAGE is enabled > or not. Also it should not really be declared individually in all functions > where it gets used. Just move the declaration outside, which also makes it &g

[PATCH] mm/pgtable: Move extern zero_pfn outside __HAVE_COLOR_ZERO_PAGE

2020-06-15 Thread Anshuman Khandual
-a...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc1. If the earlier motivation was to hide zero_pfn from general visibility, we could just put in a comment and update the commit message that my_zero_pfn() should always be used

[PATCH] arm/mm: Drop [PTE|PMD]_TYPE_FAULT

2020-06-15 Thread Anshuman Khandual
Drop these unused symbols i.e PTE_TYPE_FAULT and PMD_TYPE_FAULT. Cc: Russell King Cc: Thomas Gleixner Cc: Allison Randal Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc1. Just found by code inspection and built

[PATCH] arm64/panic: Unify all three existing notifier blocks

2020-06-15 Thread Anshuman Khandual
: Steve Capper Cc: Mark Rutland Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc1. arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/memory.h | 1 + arch/arm64/kernel/cpufeature.c | 15

[PATCH] arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[]

2020-06-15 Thread Anshuman Khandual
: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mark Brown Cc: Mark Rutland Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- Applies on 5.8-rc1. arch/arm64/kernel/cpufeature.c | 45 +++--- 1 file

[RFC V2 0/2] arm64/mm: Enable THP migration

2020-06-15 Thread Anshuman Khandual
: Zi Yan Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (2): arm64/mm: Change THP helpers per generic memory semantics arm64/mm: Enable THP migration arch/arm64/Kconfig | 4 ++ arch/arm64/include/asm/pgtable.h | 102

[RFC V2 2/2] arm64/mm: Enable THP migration

2020-06-15 Thread Anshuman Khandual
Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Suzuki Poulose Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/Kconfig | 4 arch/arm64/include/asm/pgtable.h | 10 ++ 2 files changed, 14

[RFC V2 1/2] arm64/mm: Change THP helpers per generic memory semantics

2020-06-15 Thread Anshuman Khandual
k Rutland Cc: Marc Zyngier Cc: Suzuki Poulose Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable.h | 92 arch/arm64/mm/hugetlbpage.c | 2 +- arch/arm64

[PATCH V3 4/4] Documentation/mm: Add descriptions for arch page table helpers

2020-06-14 Thread Anshuman Khandual
Cc: linux...@kvack.org Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Mike Rapoport Signed-off-by: Anshuman Khandual --- Documentation/vm/arch_pgtable_helpers.rst | 258 ++ mm/debug_vm_pgtable.c | 6 + 2 files changed, 264 insertions(

[PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-14 Thread Anshuman Khandual
ger.kernel.org Anshuman Khandual (4): mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers mm/debug_vm_pgtable: Add debug prints for individual tests Documentation/mm: Add descriptions for arch page

[PATCH V3 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers

2020-06-14 Thread Anshuman Khandual
c: linux-s...@vger.kernel.org Cc: linux-ri...@lists.infradead.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 306

[PATCH V3 3/4] mm/debug_vm_pgtable: Add debug prints for individual tests

2020-06-14 Thread Anshuman Khandual
Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 46 ++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index e3

[PATCH V3 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-06-14 Thread Anshuman Khandual
.org Cc: x...@kernel.org Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Zi Yan Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- mm/debug_vm_pgtable.c | 302 +- 1 file changed, 301 insert

Re: [PATCH V2] mm/vmstat: Add events for THP migration without split

2020-06-09 Thread Anshuman Khandual
On 06/05/2020 07:54 PM, Zi Yan wrote: > On 4 Jun 2020, at 23:35, Anshuman Khandual wrote: > >> On 06/04/2020 10:19 PM, Zi Yan wrote: >>> On 4 Jun 2020, at 12:36, Matthew Wilcox wrote: >>> >>>> On Thu, Jun 04, 2020 at 09:51:10AM -0400, Zi Yan wrote: &g

Re: [PATCH V2] mm/vmstat: Add events for THP migration without split

2020-06-04 Thread Anshuman Khandual
On 06/04/2020 10:19 PM, Zi Yan wrote: > On 4 Jun 2020, at 12:36, Matthew Wilcox wrote: > >> On Thu, Jun 04, 2020 at 09:51:10AM -0400, Zi Yan wrote: >>> On 4 Jun 2020, at 7:34, Matthew Wilcox wrote: >>>> On Thu, Jun 04, 2020 at 09:30:45AM +0530, Anshuman K

[PATCH V2] mm/vmstat: Add events for THP migration without split

2020-06-03 Thread Anshuman Khandual
cases. Cc: Naoya Horiguchi Cc: Zi Yan Cc: John Hubbard Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org [hughd: fixed oops on NULL newpage] Signed-off-by: Anshuman Khandual --- Changes in V2: - Dropped PMD reference both from code and commit message per Matthew

Re: [PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-06-02 Thread Anshuman Khandual
On 06/03/2020 08:27 AM, Matthew Wilcox wrote: > On Wed, Jun 03, 2020 at 06:56:57AM +0530, Anshuman Khandual wrote: >> On 06/02/2020 08:31 PM, Matthew Wilcox wrote: >>> On Fri, May 22, 2020 at 09:04:04AM +0530, Anshuman Khandual wrote: >>>> This adds the fol

Re: [PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-06-02 Thread Anshuman Khandual
On 06/02/2020 08:22 PM, Daniel Jordan wrote: > On Mon, Jun 01, 2020 at 09:48:09PM -0700, John Hubbard wrote: >> However, the fact that this is under discussion hints at the need for a >> bit of documentation help. What do you think about adding some notes about >> all of this to, say,

Re: [PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-06-02 Thread Anshuman Khandual
On 06/02/2020 08:31 PM, Matthew Wilcox wrote: > On Fri, May 22, 2020 at 09:04:04AM +0530, Anshuman Khandual wrote: >> This adds the following two new VM events which will help in validating PMD >> based THP migration without split. Statistics reported through these even

Re: [PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-06-01 Thread Anshuman Khandual
On 06/02/2020 10:18 AM, John Hubbard wrote: > On 2020-06-01 21:20, Anshuman Khandual wrote: > ... >>> also important: maybe this patch should also be tracking other causes >>> of THP PMD migration failure, in order to get a truer accounting of the >>> situatio

Re: [PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-06-01 Thread Anshuman Khandual
On 06/02/2020 08:50 AM, John Hubbard wrote: > On 2020-06-01 09:57, Daniel Jordan wrote: >> Hi Anshuman, >> >> On Fri, May 22, 2020 at 09:04:04AM +0530, Anshuman Khandual wrote: >>> This adds the following two new VM events which will help in validating PMD >>

Re: [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-28 Thread Anshuman Khandual
On 05/27/2020 05:55 PM, Will Deacon wrote: > On Wed, 27 May 2020 15:34:36 +0530, Anshuman Khandual wrote: >> There is no way to proceed when requested register could not be searched in >> arm64_ftr_reg[]. Requesting for a non present register would be an error as >>

[PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-27 Thread Anshuman Khandual
@vger.kernel.org Signed-off-by: Anshuman Khandual --- Changes in V3: - Early return on register search failure in some callers per Will - Return 0, when search fails in check_update_ftr_reg() per Will Changes in V2: (https://patchwork.kernel.org/patch/11570575/) - Added get_arm64_ftr_reg_nowarn

[PATCH V5 2/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register

2020-05-26 Thread Anshuman Khandual
-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 4 arch/arm64/kernel/cpufeature.c | 4 2 files changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index cf983d03aa4c..a798bb9c0845 100644 --- a/arch/arm64/include/asm

[PATCH V5 1/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register

2020-05-26 Thread Anshuman Khandual
-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 3 +++ arch/arm64/kernel/cpufeature.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index fa9d02ca4b25..cf983d03aa4c 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b

[PATCH V5 4/4] arm64/cpufeature: Replace all open bits shift encodings with macros

2020-05-26 Thread Anshuman Khandual
Cc: James Morse Cc: Suzuki K Poulose Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 28 + arch/arm64/kernel/cpufeature.c | 53

[PATCH V5 3/4] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR2 register

2020-05-26 Thread Anshuman Khandual
-by: Will Deacon Reviewed-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 7 +++ arch/arm64/kernel/cpufeature.c | 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index a798bb9c0845

[PATCH V5 0/4] arm64/cpufeature: Introduce ID_PFR2, ID_DFR1, ID_MMFR5 and other changes

2020-05-26 Thread Anshuman Khandual
ill - Changed ID_PFR0.CSV2 (FTR_STRICT -> FTR_NONSTRICT) as 64 bit registers per Will - Changed some commit messages Changes in V1: (https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=234093) Anshuman Khandual (4): arm64/cpufeature: Add remaining feature bits in ID_AA

Re: [PATCH V2] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-26 Thread Anshuman Khandual
On 05/27/2020 01:16 AM, Will Deacon wrote: > On Tue, May 26, 2020 at 04:01:35PM +0100, Catalin Marinas wrote: >> On Tue, May 26, 2020 at 07:09:13PM +0530, Anshuman Khandual wrote: >>> @@ -632,8 +654,6 @@ static void __init init_cpu_ftr_reg(u32 sys_reg, u64 >>>

Re: [PATCH V2] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-26 Thread Anshuman Khandual
On 05/26/2020 07:34 PM, Suzuki K Poulose wrote: > On 05/26/2020 02:39 PM, Anshuman Khandual wrote: >> There is no way to proceed when requested register could not be searched in >> arm64_ftr_reg[]. Requesting for a non present register would be an error as >> well. He

[PATCH V2] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-26 Thread Anshuman Khandual
@vger.kernel.org Signed-off-by: Anshuman Khandual --- Changes in V2: - Added get_arm64_ftr_reg_nowarn() per Will - read_sanitised_ftr_reg() returns 0 when register search fails per Catalin Changes in V1: (https://patchwork.kernel.org/patch/11559083/) arch/arm64/kernel/cpufeature.c | 42

Re: [PATCH v3 1/6] arm64: Detect the ARMv8.4 TTL feature

2020-05-25 Thread Anshuman Khandual
Hello Zhenyu, On 05/25/2020 06:22 PM, Zhenyu Ye wrote: > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index c4ac0ac25a00..477d84ba1056 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -725,6 +725,7 @@ > > /*

Re: [PATCH V4 00/17] arm64/cpufeature: Introduce ID_PFR2, ID_DFR1, ID_MMFR5 and other changes

2020-05-25 Thread Anshuman Khandual
On 05/21/2020 08:49 PM, Will Deacon wrote: > On Tue, 19 May 2020 15:10:37 +0530, Anshuman Khandual wrote: >> This series is primarily motivated from an adhoc list from Mark Rutland >> during our previous ID_ISAR6 discussion [1]. The current proposal also >> accommodates

Re: [PATCH] arm64/cpufeature: Move BUG_ON() inside get_arm64_ftr_reg()

2020-05-24 Thread Anshuman Khandual
On 05/21/2020 10:29 PM, Catalin Marinas wrote: > On Thu, May 21, 2020 at 05:22:15PM +0100, Will Deacon wrote: >> On Thu, May 21, 2020 at 08:45:38AM +0530, Anshuman Khandual wrote: >>> On 05/20/2020 11:09 PM, Will Deacon wrote: >>>> On Wed, May 20, 2020 at 04:47:11P

Re: [PATCH V4 12/17] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register

2020-05-24 Thread Anshuman Khandual
On 05/19/2020 07:02 PM, Suzuki K Poulose wrote: > On 05/19/2020 10:40 AM, Anshuman Khandual wrote: >> Enable EVC, FGT, EXS, TGRAN4_2, TGRAN64_2 and TGRAN16_2 features bits in >> ID_AA64MMFR0 register as per ARM DDI 0487F.a specification. >> >> Cc: Catalin Marinas

Re: [PATCH V4 13/17] arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register

2020-05-23 Thread Anshuman Khandual
On 05/19/2020 07:14 PM, Suzuki K Poulose wrote: > On 05/19/2020 10:40 AM, Anshuman Khandual wrote: >> Enable ETS, TWED, XNX and SPECSEI features bits in ID_AA64MMFR1 register as >> per ARM DDI 0487F.a specification. >> >> Cc: Catalin Marinas >> Cc: Will D

Re: [PATCH V4 15/17] arm64/cpufeature: Add remaining feature bits in ID_AA64DFR0 register

2020-05-23 Thread Anshuman Khandual
On 05/20/2020 07:27 PM, Suzuki K Poulose wrote: > On 05/19/2020 10:40 AM, Anshuman Khandual wrote: >> Enable MTPMU and TRACEFILT features bits in ID_AA64DFR0 register as per ARM >> DDI 0487F.a specification. >> >> Cc: Catalin Marinas >> Cc: Will Deacon >

[PATCH] mm/vmstat: Add events for PMD based THP migration without split

2020-05-21 Thread Anshuman Khandual
Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org [hughd: fixed oops on NULL newpage] Signed-off-by: Anshuman Khandual --- Changes in V1: - Changed function name as thp_pmd_migration_success() per John - Folded in a fix (https://patchwork.kernel.org/patch/11563009/) from

Re: [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix

2020-05-21 Thread Anshuman Khandual
On 05/21/2020 07:19 PM, Hugh Dickins wrote: > Fix 5.7-rc6-mm1 page migration crash in unmap_and_move(): when the > page to be migrated has been freed from under us, that is considered > a MIGRATEPAGE_SUCCESS, but no newpage has been allocated (and I don't > think it would ever need to be

Re: [RFC V2] mm/vmstat: Add events for PMD based THP migration without split

2020-05-20 Thread Anshuman Khandual
On 05/20/2020 12:45 PM, HORIGUCHI NAOYA(堀口 直也) wrote: > On Mon, May 18, 2020 at 12:12:36PM +0530, Anshuman Khandual wrote: >> This adds the following two new VM events which will help in validating PMD >> based THP migration without split. Statistics reported through these even

<    1   2   3   4   5   6   7   8   9   10   >