[PATCH v2 4/5] sparc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes

2025-03-03 Thread Ryan Roberts
and Acked-by: Andreas Larsson Signed-off-by: Ryan Roberts --- arch/sparc/include/asm/pgtable_64.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 2b7f358762c1..dc28f2c4eee3 100644 --- a/arch/sparc/include/

[PATCH v2 1/5] mm: Fix lazy mmu docs and usage

2025-03-03 Thread Ryan Roberts
of issues being reported in the wild. Cc: Fixes: bcc6cc832573 ("mm: add default definition of set_ptes()") Acked-by: David Hildenbrand Signed-off-by: Ryan Roberts --- include/linux/pgtable.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/li

[PATCH v2 5/5] Revert "x86/xen: allow nesting of same lazy mode"

2025-03-03 Thread Ryan Roberts
) and remove this x86-specific solution. Acked-by: David Hildenbrand Signed-off-by: Ryan Roberts --- arch/x86/include/asm/xen/hypervisor.h | 15 ++- arch/x86/xen/enlighten_pv.c | 1 - 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/x86/include/asm/xen/hyperv

[PATCH v2 2/5] fs/proc/task_mmu: Reduce scope of lazy mmu region

2025-03-03 Thread Ryan Roberts
asn't technically a bug here, the original scope made it easier to accidentally nest or, worse, accidentally call something like kmap() which would expect an immediate mode pte modification but it would end up deferred. Acked-by: David Hildenbrand Signed-off-by: Ryan Roberts --- fs/proc/task_

[PATCH v2 3/5] sparc/mm: Disable preemption in lazy mmu mode

2025-03-03 Thread Ryan Roberts
: call pte function with lazy updates") Acked-by: David Hildenbrand Acked-by: Andreas Larsson Signed-off-by: Ryan Roberts --- arch/sparc/mm/tlb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index 8648a50afe88..a35ddcca5e76

[PATCH v2 0/5] Fix lazy mmu mode

2025-03-03 Thread Ryan Roberts
hanges since v1 - split v1 patch #1 into v2 patch #1 and #2; per David - Added Acked-by tags from David and Andreas; Thanks! - Refined the patches which are truely fixes and added to stable to cc Thanks, Ryan Ryan Roberts (5): mm: Fix lazy mmu docs and usage fs/proc/task_mmu:

Re: [PATCH v1 4/4] Revert "x86/xen: allow nesting of same lazy mode"

2025-03-03 Thread Ryan Roberts
On 03/03/2025 11:52, David Hildenbrand wrote: > On 02.03.25 15:55, Ryan Roberts wrote: >> Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") was >> added as a solution for a core-mm code change where >> arch_[enter|leave]_lazy_mmu_mode() started to

Re: [PATCH v1 1/4] mm: Fix lazy mmu docs and usage

2025-03-03 Thread Ryan Roberts
On 03/03/2025 08:52, David Hildenbrand wrote: > On 03.03.25 09:49, David Hildenbrand wrote: >> On 02.03.25 15:55, Ryan Roberts wrote: >>> The docs, implementations and use of arch_[enter|leave]_lazy_mmu_mode() >>> is a bit of a mess (to put it politely). There are a numb

[PATCH v1 4/4] Revert "x86/xen: allow nesting of same lazy mode"

2025-03-02 Thread Ryan Roberts
) and remove this x86-specific solution. Fixes: 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") Signed-off-by: Ryan Roberts --- arch/x86/include/asm/xen/hypervisor.h | 15 ++- arch/x86/xen/enlighten_pv.c | 1 - 2 files changed, 2 insertions(+), 14 deletions(-

[PATCH v1 0/4] Fix lazy mmu mode

2025-03-02 Thread Ryan Roberts
eries. See patch #1 commit log for all the details. Note that I have only been able to compile test these changes so appreciate any help in testing. Applies on Friday's mm-unstable (5f089a9aa987), as I assume this would be preferred via that tree. Thanks, Ryan Ryan Roberts (4): mm: Fix la

[PATCH v1 3/4] sparc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes

2025-03-02 Thread Ryan Roberts
leave_lazy_mmu() Powerpc suffered the same problem and fixed it in a corresponding way with commit 47b8def9358c ("powerpc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes"). Fixes: 1a10a44dfc1d ("sparc64: implement the new page table range API") Signed-off-by: Ryan Roberts

[PATCH v1 2/4] sparc/mm: Disable preemption in lazy mmu mode

2025-03-02 Thread Ryan Roberts
l pte function with lazy updates") Signed-off-by: Ryan Roberts --- arch/sparc/mm/tlb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index 8648a50afe88..a35ddcca5e76 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tl

[PATCH v1 1/4] mm: Fix lazy mmu docs and usage

2025-03-02 Thread Ryan Roberts
it would end up deferred. arch-specific fixes to conform to the new spec will proceed this one. These issues were spotted by code review and I have no evidence of issues being reported in the wild. Signed-off-by: Ryan Roberts --- fs/proc/task_mmu.c | 11 --- include/linux/pgtable.h

Re: [RFC PATCH v1 36/57] xen: Remove PAGE_SIZE compile-time constant assumption

2024-10-24 Thread Ryan Roberts
On 23/10/2024 02:23, Stefano Stabellini wrote: > +Julien > > On Wed, 16 Oct 2024, Ryan Roberts wrote: >> + Juergen Gross, Stefano Stabellini >> >> This was a rather tricky series to get the recipients correct for and my >> script >> did not reali

Re: [RFC PATCH v1 36/57] xen: Remove PAGE_SIZE compile-time constant assumption

2024-10-16 Thread Ryan Roberts
/lore.kernel.org/all/20241014105514.3206191-1-ryan.robe...@arm.com/ On 14/10/2024 11:58, Ryan Roberts wrote: > To prepare for supporting boot-time page size selection, refactor code > to remove assumptions about PAGE_SIZE being compile-time constant. Code > intended to be equivalent when com

[RFC PATCH v1 36/57] xen: Remove PAGE_SIZE compile-time constant assumption

2024-10-14 Thread Ryan Roberts
t-time, it can be evaluated at run time. Refactor a BUILD_BUG_ON to evaluate the limit (when the minimum supported page size is selected at boot-time). Reserve enough storage for max page size in "struct remap_data" and "struct xenbus_map_node". Signed-off-by: Ryan Roberts