values.
Signed-off-by: Aneesh Kumar K.V
---
mm/memory_hotplug.c | 109 ++--
1 file changed, 96 insertions(+), 13 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 5921c81fcb70..c409f5ff6a59 100644
--- a/mm/memory_hotplug.c
+++ b/mm
Some architectures would want different restrictions. Hence add an
architecture-specific override.
Both the PMD_SIZE check and pageblock alignment check are moved there.
Signed-off-by: Aneesh Kumar K.V
---
mm/memory_hotplug.c | 22 +++---
1 file changed, 19 insertions(+), 3
If not supported, fallback to not using memap on memmory. This avoids
the need for callers to do the fallback.
Signed-off-by: Aneesh Kumar K.V
---
drivers/acpi/acpi_memhotplug.c | 3 +--
include/linux/memory_hotplug.h | 3 ++-
mm/memory_hotplug.c| 13 ++---
3 files changed
Instead of adding menu entry with all supported architectures, add
mm/Kconfig variable and select the same from supported architectures.
No functional change in this patch.
Acked-by: David Hildenbrand
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/Kconfig | 4 +---
arch/x86/Kconfig | 4
linus tree
Aneesh Kumar K.V (6):
mm/hotplug: Simplify ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE kconfig
mm/hotplug: Allow memmap on memory hotplug request to fallback
mm/hotplug: Allow architecture to override memmap on memory support
check
mm/hotplug: Allow pageblock alignment via altmap
vmemmap mapping
[ 293.550032] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550076] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550117] radix-mmu: PMD_SIZE vmemmap mapping
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +++
1 file changed, 3 insertions(+)
diff
With 2M PMD-level mapping, we require 32 struct pages and a single vmemmap
page can contain 1024 struct pages (PAGE_SIZE/sizeof(struct page)). Hence
with 64K page size, we don't use vmemmap deduplication for PMD-level
mapping.
Signed-off-by: Aneesh Kumar K.V
---
Documentati
This is not used by radix anymore.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 11 ---
arch/powerpc/mm/init_64.c| 21 ++---
2 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/mm/book3s64
page size, we need to do the above check even at the
PAGE_SIZE granularity.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/radix.h | 2 +
arch/powerpc/include/asm/pgtable.h | 4 +
arch/powerpc/mm/book3s64/radix_pgtable.c | 326 +++--
arch/
expected pte bit combination is _PAGE_PTE | _PAGE_DEVMAP.
Some of the helpers are never expected to get called on hash translation
and hence is marked to call BUG() in such a case.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/hash.h | 9 +
arch/powerpc/include/asm
A follow-up patch will add a pud variant for this same event.
Using event class makes that addition simpler.
No functional change in this patch.
Reviewed-by: Christophe Leroy
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +-
arch/powerpc/mm/book3s64
config is not
enabled for them. With this change, arm64 should be able to select DAX
optimization
[1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable
HUGETLB_PAGE_OPTIMIZE_VMEMMAP")
Signed-off-by: Aneesh Kumar K.V
---
arch/loongarch/Kconfig | 2 +-
arch/riscv/Kconfig | 2 +
pudp_set_wrprotect and move_huge_pud helpers are only used when
CONFIG_TRANSPARENT_HUGEPAGE is enabled. Similar to pmdp_set_wrprotect and
move_huge_pmd_helpers use architecture override only if
CONFIG_TRANSPARENT_HUGEPAGE is set
Reviewed-by: Christophe Leroy
Signed-off-by: Aneesh Kumar K.V
This helps architectures to override pmd_same and pud_same independently.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 6fd9b2831338..ca67ecbd9a66 100644
--- a/include
Architectures like powerpc will like to use different page table allocators
and mapping mechanisms to implement vmemmap optimization. Similar to
vmemmap_populate allow architectures to implement
vmemap_populate_compound_pages
Signed-off-by: Aneesh Kumar K.V
---
mm/sparse-vmemmap.c | 3 +++
1
MMU translation). Hence allow architecture
override.
Reviewed-by: Christophe Leroy
Signed-off-by: Aneesh Kumar K.V
---
include/linux/mm.h | 27 +++
mm/mm_init.c | 2 +-
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/include/linux/mm.h b/include/linux
We will use this in a later patch to do tlb flush when clearing pud entries
on powerpc. This is similar to commit 93a98695f2f9 ("mm: change
pmdp_huge_get_and_clear_full take vm_area_struct as arg")
Reviewed-by: Christophe Leroy
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgt
tree
* Address review feedback
Changes from V1:
* Fix make htmldocs warning
* Fix vmemmap allocation bugs with different alignment values.
* Correctly check for section validity to before we free vmemmap area
Aneesh Kumar K.V (13):
mm/hugepage pud: Allow arch-specific helper function to check hu
Architectures like powerpc would like to enable transparent huge page pud
support only with radix translation. To support that add
has_transparent_pud_hugepage() helper that architectures can override.
Reviewed-by: Christophe Leroy
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/pfn_devs.c
Kautuk Consul writes:
> - Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL as ppc64 is weakly
> ordered.
> - Enable CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP because the
> kvmppc_xive_native_set_attr is called in the context of an ioctl
> syscall and will call kvmppc_xive_native_eq_sync for setting t
David Hildenbrand writes:
> On 12.07.23 05:16, Aneesh Kumar K V wrote:
>> On 7/11/23 10:49 PM, David Hildenbrand wrote:
>>> On 11.07.23 06:48, Aneesh Kumar K.V wrote:
>>>> Add a new kconfig option that can be selected if we want to allow
>>>> pageblock a
ew Morton
Cc: David Hildenbrand
Cc: Oscar Salvador
Cc: Dan Williams
Cc: Dave Jiang
Cc: Dave Hansen
Cc: Huang Ying
Signed-off-by: Vishal Verma
Signed-off-by: Aneesh Kumar K.V
---
drivers/dax/kmem.c | 81 +-
1 file changed, 59 insertions(+), 22 deleti
functional change in this patch
Signed-off-by: Aneesh Kumar K.V
---
drivers/base/memory.c | 35 ++-
include/linux/memory.h | 8 ++--
mm/memory_hotplug.c| 34 ++
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a
block
size, we require 4 pages to map vmemmap pages, In order to align things
correctly we end up adding a reserve of 28 pages. ie, for every 4096
pages 28 pages get reserved.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/pgtable.h
values.
Signed-off-by: Aneesh Kumar K.V
---
mm/Kconfig | 9 +++
mm/memory_hotplug.c | 59 +
2 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 932349271e28..88a1472b2086 100644
--- a/mm/Kconfig
Some architectures would want different restrictions. Hence add an
architecture-specific override.
Both the PMD_SIZE check and pageblock alignment check are moved there.
Signed-off-by: Aneesh Kumar K.V
---
mm/memory_hotplug.c | 17 -
1 file changed, 12 insertions(+), 5
If not supported, fallback to not using memap on memmory. This avoids
the need for callers to do the fallback.
Signed-off-by: Aneesh Kumar K.V
---
drivers/acpi/acpi_memhotplug.c | 3 +--
include/linux/memory_hotplug.h | 1 -
mm/memory_hotplug.c| 13 ++---
3 files changed
Instead of adding menu entry with all supported architectures, add
mm/Kconfig variable and select the same from supported architectures.
No functional change in this patch.
Acked-by: David Hildenbrand
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/Kconfig | 4 +---
arch/x86/Kconfig | 4
store vmemmap_altmap details. This is required
so that when we remove the memory we can find the altmap details which
is needed on some architectures.
* rebase to latest linus tree
Aneesh Kumar K.V (6):
mm/hotplug: Simplify ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE kconfig
mm/hotplug: Allow memmap on
Christophe Leroy writes:
> Le 10/07/2023 à 18:08, Aneesh Kumar K.V a écrit :
>> Architectures like powerpc will like to use different page table allocators
>> and mapping mechanisms to implement vmemmap optimization. Similar to
>> vmemmap_populate allow archi
Christophe Leroy writes:
> Le 10/07/2023 à 18:08, Aneesh Kumar K.V a écrit :
>> dax vmemmap optimization requires a minimum of 2 PAGE_SIZE area within
>> vmemmap such that tail page mapping can point to the second PAGE_SIZE area.
>> Enforce that in vmemmap_ca
Christophe Leroy writes:
> Le 10/07/2023 à 18:08, Aneesh Kumar K.V a écrit :
>> This helps architectures to override pmd_same and pud_same independently.
>>
>> Signed-off-by: Aneesh Kumar K.V
>
> Reviewed-by: Christophe Leroy
>
> Shouldn't you do it t
vmemmap mapping
[ 293.550032] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550076] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550117] radix-mmu: PMD_SIZE vmemmap mapping
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +++
1 file changed, 3 insertions(+)
diff
This is not used by radix anymore.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 11 ---
arch/powerpc/mm/init_64.c| 21 ++---
2 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/mm/book3s64
With 2M PMD-level mapping, we require 32 struct pages and a single vmemmap
page can contain 1024 struct pages (PAGE_SIZE/sizeof(struct page)). Hence
with 64K page size, we don't use vmemmap deduplication for PMD-level
mapping.
Signed-off-by: Aneesh Kumar K.V
---
Documentati
page size, we need to do the above check even at the
PAGE_SIZE granularity.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/radix.h | 2 +
arch/powerpc/include/asm/pgtable.h | 4 +
arch/powerpc/mm/book3s64/radix_pgtable.c | 326 +++--
arch/
expected pte bit combination is _PAGE_PTE | _PAGE_DEVMAP.
Some of the helpers are never expected to get called on hash translation
and hence is marked to call BUG() in such a case.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/hash.h | 9 +
arch/powerpc/include/asm
A follow-up patch will add a pud variant for this same event.
Using event class makes that addition simpler.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
include/trace
config is not
enabled for them. With this change, arm64 should be able to select DAX
optimization
[1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable
HUGETLB_PAGE_OPTIMIZE_VMEMMAP")
Signed-off-by: Aneesh Kumar K.V
---
arch/loongarch/Kconfig | 2 +-
arch/riscv/Kconfig | 2 +
pudp_set_wrprotect and move_huge_pud helpers are only used when
CONFIG_TRANSPARENT_HUGEPAGE is enabled. Similar to pmdp_set_wrprotect and
move_huge_pmd_helpers use architecture override only if
CONFIG_TRANSPARENT_HUGEPAGE is set
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2
This helps architectures to override pmd_same and pud_same independently.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 6fd9b2831338..91def34f7784 100644
--- a/include
Architectures like powerpc will like to use different page table allocators
and mapping mechanisms to implement vmemmap optimization. Similar to
vmemmap_populate allow architectures to implement
vmemap_populate_compound_pages
Signed-off-by: Aneesh Kumar K.V
---
mm/sparse-vmemmap.c | 3 +++
1
MMU translation). Hence allow architecture
override.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/mm.h | 27 +++
mm/mm_init.c | 2 +-
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 2dd73e4f3d8e
We will use this in a later patch to do tlb flush when clearing pud entries
on powerpc. This is similar to commit 93a98695f2f9 ("mm: change
pmdp_huge_get_and_clear_full take vm_area_struct as arg")
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 4 ++--
mm/debug_vm_pgtab
Architectures like powerpc would like to enable transparent huge page pud
support only with radix translation. To support that add
has_transparent_pud_hugepage() helper that architectures can override.
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/pfn_devs.c | 2 +-
include/linux/pgtable.h
s warning
* Fix vmemmap allocation bugs with different alignment values.
* Correctly check for section validity to before we free vmemmap area
Aneesh Kumar K.V (13):
mm/hugepage pud: Allow arch-specific helper function to check huge
page pud support
mm: Change pudp_huge_get_and_
using vmem_altmap, the kernel fails to unplug the memory if the
request is not a single memory block unplug.
Signed-off-by: Aneesh Kumar K.V
---
drivers/base/memory.c| 28 +++-
include/linux/memory.h | 25 +++--
include/linux/memremap.h | 18
vmemmap mapping
[ 293.550032] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550076] radix-mmu: PMD_SIZE vmemmap mapping
[ 293.550117] radix-mmu: PMD_SIZE vmemmap mapping
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +++
1 file changed, 3 insertions(+)
diff
This is not used by radix anymore.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 11 ---
arch/powerpc/mm/init_64.c| 21 ++---
2 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/mm/book3s64
With 2M PMD-level mapping, we require 32 struct pages and a single vmemmap
page can contain 1024 struct pages (PAGE_SIZE/sizeof(struct page)). Hence
with 64K page size, we don't use vmemmap deduplication for PMD-level
mapping.
Signed-off-by: Aneesh Kumar K.V
---
Documentati
page size, we need to do the above check even at the
PAGE_SIZE granularity.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/radix.h | 2 +
arch/powerpc/include/asm/pgtable.h | 4 +
arch/powerpc/mm/book3s64/radix_pgtable.c | 318 +++--
arch/
expected pte bit combination is _PAGE_PTE | _PAGE_DEVMAP.
Some of the helpers are never expected to get called on hash translation
and hence is marked to call BUG() in such a case.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 156 --
arch
A follow-up patch will add a pud variant for this same event.
Using event class makes that addition simpler.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
include/trace
config is not
enabled for them. With this change, arm64 should be able to select DAX
optimization
[1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable
HUGETLB_PAGE_OPTIMIZE_VMEMMAP")
Signed-off-by: Aneesh Kumar K.V
---
arch/loongarch/Kconfig | 2 +-
arch/riscv/Kconfig | 2 +
pudp_set_wrprotect and move_huge_pud helpers are only used when
CONFIG_TRANSPARENT_HUGEPAGE is enabled. Similar to pmdp_set_wrprotect and
move_huge_pmd_helpers use architecture override only if
CONFIG_TRANSPARENT_HUGEPAGE is set
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2
This helps architectures to override pmd_same and pud_same independently.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 6fd9b2831338..91def34f7784 100644
--- a/include
Architectures like powerpc will like to use different page table allocators
and mapping mechanisms to implement vmemmap optimization. Similar to
vmemmap_populate allow architectures to implement
vmemap_populate_compound_pages
Signed-off-by: Aneesh Kumar K.V
---
mm/sparse-vmemmap.c | 3 +++
1
MMU translation). Hence allow architecture
override.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/mm.h | 27 +++
mm/mm_init.c | 2 +-
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 2dd73e4f3d8e
Architectures like powerpc would like to enable transparent huge page pud
support only with radix translation. To support that add
has_transparent_pud_hugepage() helper that architectures can override.
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/pfn_devs.c | 2 +-
include/linux/pgtable.h
We will use this in a later patch to do tlb flush when clearing pud entries
on powerpc. This is similar to commit 93a98695f2f9 ("mm: change
pmdp_huge_get_and_clear_full take vm_area_struct as arg")
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 4 ++--
mm/debug_vm_pgtab
ee vmemmap area
Aneesh Kumar K.V (13):
mm/hugepage pud: Allow arch-specific helper function to check huge
page pud support
mm: Change pudp_huge_get_and_clear_full take vm_area_struct as arg
mm/vmemmap: Improve vmemmap_can_optimize and allow architectures to
override
mm/vmemmap: Allow a
, we require 4 pages to map vmemmap pages, In order to align things
correctly we end up adding a reserve of 28 pages. ie, for every 4096 pages
28 pages get reserved.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/mm/book3s64/radix_pgtable.c
Instead of adding menu entry with all supported architectures, add
mm/Kconfig variable and select the same from supported architectures.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/Kconfig | 4 +---
arch/x86/Kconfig | 4 +---
mm/Kconfig | 3
flag unconditionally because the kernel will
fallback to not using the feature if the alignment rules are not met.
Signed-off-by: Aneesh Kumar K.V
---
drivers/acpi/acpi_memhotplug.c | 3 +--
include/linux/memory_hotplug.h | 14 ++
mm/memory_hotplug.c| 35
use this.
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/mm/mmu.c| 5 +
arch/x86/mm/init_64.c | 6 ++
include/linux/memory_hotplug.h | 3 ++-
mm/memory_hotplug.c| 36 --
4 files changed, 39 insertions(+), 11 deletions
on some architectures.
* rebase to latest linus tree
Aneesh Kumar K.V (5):
mm/hotplug: Embed vmem_altmap details in memory block
mm/hotplug: Allow architecture override for memmap on memory feature
mm/hotplug: Simplify the handling of MHP_MEMMAP_ON_MEMORY flag
mm/hotplug: Simplify
0xbc/0x1a0
ret_from_kernel_user_thread+0x14/0x1c
Cc: Hugh Dickins
Reported-by: Michael Ellerman
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/hash-4k.h | 6 --
arch/powerpc/include/asm/book3s/64/hash-64k.h | 5 -
arch/powerpc/include/asm/book3s/64/hash.h |
, we require 4 pages to map vmemmap pages, In order to align things
correctly we end up adding a reserve of 28 pages. ie, for every 4096 pages
28 pages get reserved.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/mm/book3s64/radix_pgtable.c
Instead of adding menu entry with all supported architectures, add
mm/Kconfig variable and select the same from supported architectures.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/Kconfig | 4 +---
arch/x86/Kconfig | 4 +---
mm/Kconfig | 3
flag unconditionally because the kernel will
fallback to not using the feature if the alignment rules are not met.
Signed-off-by: Aneesh Kumar K.V
---
drivers/acpi/acpi_memhotplug.c | 3 +--
include/linux/memory_hotplug.h | 14 ++
mm/memory_hotplug.c| 19
use this.
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/mm/mmu.c| 5 +
arch/x86/mm/init_64.c | 6 ++
include/linux/memory_hotplug.h | 3 ++-
mm/memory_hotplug.c| 36 --
4 files changed, 39 insertions(+), 11 deletions
using vmem_altmap, the kernel fails to unplug the memory if the
request is not a single memory block unplug.
Signed-off-by: Aneesh Kumar K.V
---
drivers/base/memory.c| 28 ++-
include/linux/memory.h | 25 ++--
include/linux/memremap.h | 18
dax vmemmap optimization series
posted here
https://lore.kernel.org/linux-mm/20230616110826.344417-1-aneesh.ku...@linux.ibm.com
Aneesh Kumar K.V (5):
mm/hotplug: Embed vmem_altmap details in memory block
mm/hotplug: Allow architecture override for memmap on memory feature
mm/hotplug
Hi Andrew,
"Aneesh Kumar K.V" writes:
> This patch series implements changes required to support DAX vmemmap
> optimization for ppc64. The vmemmap optimization is only enabled with radix
> MMU
> translation and 1GB PUD mapping with 64K page size. The patch series a
Joao Martins writes:
> On 16/06/2023 12:08, Aneesh Kumar K.V wrote:
>> dax vmemmap optimization requires a minimum of 2 PAGE_SIZE area within
>> vmemmap such that tail page mapping can point to the second PAGE_SIZE area.
>> Enforce that in vmemmap_can_optimize() function.
David Hildenbrand writes:
> On 09.06.23 08:08, Aneesh Kumar K.V wrote:
>> Certain devices can possess non-standard memory capacities, not constrained
>> to multiples of 1GB. Provide a kernel parameter so that we can map the
>> device memory completely on memory hotplug.
&g
pudp_set_wrprotect and move_huge_pud helpers are only used when
CONFIG_TRANSPARENT_HUGEPAGE is enabled. Similar to pmdp_set_wrprotect and
move_huge_pmd_helpers use architecture override only if
CONFIG_TRANSPARENT_HUGEPAGE is set
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2
Architectures like powerpc will like to use different page table allocators
and mapping mechanisms to implement vmemmap optimization. Similar to
vmemmap_populate allow architectures to implement
vmemap_populate_compound_pages
Signed-off-by: Aneesh Kumar K.V
---
mm/sparse-vmemmap.c | 3 +++
1
This is not used by radix anymore.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 10 --
arch/powerpc/mm/init_64.c| 21 ++---
2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/mm/book3s64
With 2M PMD-level mapping, we require 32 struct pages and a single vmemmap
page can contain 1024 struct pages (PAGE_SIZE/sizeof(struct page)). Hence
with 64K page size, we don't use vmemmap deduplication for PMD-level
mapping.
Signed-off-by: Aneesh Kumar K.V
---
Documentati
page size, we need to do the above check even at the
PAGE_SIZE granularity.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/radix.h | 2 +
arch/powerpc/include/asm/pgtable.h | 3 +
arch/powerpc/mm/book3s64/radix_pgtable.c | 319 +++--
arch/
expected pte bit combination is _PAGE_PTE | _PAGE_DEVMAP.
Some of the helpers are never expected to get called on hash translation
and hence is marked to call BUG() in such a case.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 156 --
arch
fig is not
enabled for them. With this change, arm64 should be able to select DAX
optimization
[1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable
HUGETLB_PAGE_OPTIMIZE_VMEMMAP")
Signed-off-by: Aneesh Kumar K.V
---
arch/loongarch/Kconfig | 2 +-
arch/riscv/Kconfig | 2 +-
arch/x
This helps architectures to override pmd_same and pud_same independently.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 2fe19720075e..8c5174d1f9db 100644
--- a/include
MMU translation). Hence allow architecture
override.
Signed-off-by: Aneesh Kumar K.V
---
include/linux/mm.h | 30 ++
mm/mm_init.c | 2 +-
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 27ce77080c79
We will use this in a later patch to do tlb flush when clearing pud entries
on powerpc. This is similar to commit 93a98695f2f9 ("mm: change
pmdp_huge_get_and_clear_full take vm_area_struct as arg")
Signed-off-by: Aneesh Kumar K.V
---
include/linux/pgtable.h | 4 ++--
mm/debug_vm_pgtab
Architectures like powerpc would like to enable transparent huge page pud
support only with radix translation. To support that add
has_transparent_pud_hugepage() helper that architectures can override.
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/pfn_devs.c | 2 +-
include/linux/pgtable.h
Without this fix, the last subsection vmemmap can end up in memory even if
the namespace is created with -M mem and has sufficient space in the altmap
area.
Fixes: cf387d9644d8 ("libnvdimm/altmap: Track namespace boundaries in altmap")
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c
b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 15a099e53cde
: 0 kB
DirectMap64k: 0 kB
DirectMap2M:104857600 kB
DirectMap1G: 0 kB
Fixes: a2dc009afa9a ("powerpc/mm/book3s/radix: Add mapping statistics")
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 34 +++-
1 fi
This should not be within CONFIG_PPC_64S_HASHS_MMU. We use
mmu_vmemmap_psize on radix while mapping the vmemmap area.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c
b
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c
b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 2297aa764ecd
ion: Split hugetlb and
devdax vmemmap optimization"
Changes from V1:
* Fix make htmldocs warning
* Fix vmemmap allocation bugs with different alignment values.
* Correctly check for section validity to before we free vmemmap area
Aneesh Kumar K.V (16):
powerpc/mm/book3s64: Use pmdp_ptep he
ze, we need to do the above check even at the PAGE_SIZE granularity.
>>
>> Signed-off-by: Aneesh Kumar K.V
>> ---
>
> With this patch series applied I see the following warning
>
> [ OK ] Started Monitoring of LVM2 mirrors,…sing dmeventd or progress
>
"Aneesh Kumar K.V" writes:
> This patch series implements changes required to support DAX vmemmap
> optimization for ppc64. The vmemmap optimization is only enabled with radix
> MMU
> translation and 1GB PUD mapping with 64K page size. The patch series also
>
also be more than the section size.
Signed-off-by: Aneesh Kumar K.V
---
.../admin-guide/kernel-parameters.txt | 3 +++
arch/powerpc/kernel/setup_64.c| 23 +++
arch/powerpc/mm/init_64.c | 17 ++
3 files changed, 38 insertions
block size value.
Signed-off-by: Aneesh Kumar K.V
---
Changes from v1:
* Add a helper to parse device tree for memory block size
* Drop pseries and powernv functions used.
arch/powerpc/include/asm/book3s/64/mmu.h | 5 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 65
correct machine-specific callback is assigned.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/book3s/64/mmu.h | 5 --
arch/powerpc/mm/book3s64/radix_pgtable.c | 64 +---
arch/powerpc/platforms/powernv/setup.c | 4 +-
3
also be more than the section size.
Signed-off-by: Aneesh Kumar K.V
---
.../admin-guide/kernel-parameters.txt | 3 +++
arch/powerpc/kernel/setup_64.c| 27 +++
2 files changed, 30 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b
This is not used by radix anymore.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 10 --
arch/powerpc/mm/init_64.c| 21 ++---
2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/mm/book3s64
101 - 200 of 2679 matches
Mail list logo