diff options
4 files changed, 4 insertions, 121 deletions
diff --git a/android-mainline/ANDROID-Initial-commit-of-Incremental-FS.patch b/android-mainline/ANDROID-Initial-commit-of-Incremental-FS.patch index 187cfc95..89712c2e 100644 --- a/android-mainline/ANDROID-Initial-commit-of-Incremental-FS.patch +++ b/android-mainline/ANDROID-Initial-commit-of-Incremental-FS.patch @@ -230,7 +230,7 @@ new file mode 100644 diff --git a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -10374,6 +10374,13 @@ F: Documentation/hwmon/ina2xx.rst +@@ -10373,6 +10373,13 @@ F: Documentation/hwmon/ina2xx.rst F: drivers/hwmon/ina2xx.c F: include/linux/platform_data/ina2xx.h diff --git a/android-mainline/ANDROID-mm-Memory-health-driver.patch b/android-mainline/ANDROID-mm-Memory-health-driver.patch index 0aca3fd0..f6809227 100644 --- a/android-mainline/ANDROID-mm-Memory-health-driver.patch +++ b/android-mainline/ANDROID-mm-Memory-health-driver.patch @@ -550,7 +550,7 @@ diff --git a/mm/oom_kill.c b/mm/oom_kill.c diff --git a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -6418,6 +6418,13 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order, +@@ -6423,6 +6423,13 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order, return nr_reclaimed; } diff --git a/android-mainline/FROMGIT-arch-mm-fault-fix-major-fault-accounting-when-retrying-under-per-VMA-lock.patch b/android-mainline/FROMGIT-arch-mm-fault-fix-major-fault-accounting-when-retrying-under-per-VMA-lock.patch deleted file mode 100644 index f2e6761a..00000000 --- a/android-mainline/FROMGIT-arch-mm-fault-fix-major-fault-accounting-when-retrying-under-per-VMA-lock.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Suren Baghdasaryan <surenb@google.com> -Date: Tue, 26 Dec 2023 13:46:10 -0800 -Subject: FROMGIT: arch/mm/fault: fix major fault accounting when retrying - under per-VMA lock - -A test [1] in Android test suite started failing after [2] was merged. It -turns out that after handling a major fault under per-VMA lock, the -process major fault counter does not register that fault as major. Before -[2] read faults would be done under mmap_lock, in which case -FAULT_FLAG_TRIED flag is set before retrying. That in turn causes -mm_account_fault() to account the fault as major once retry completes. -With per-VMA locks we often retry because a fault can't be handled without -locking the whole mm using mmap_lock. Therefore such retries do not set -FAULT_FLAG_TRIED flag. This logic does not work after [2] because we can -now handle read major faults under per-VMA lock and upon retry the fact -there was a major fault gets lost. Fix this by setting FAULT_FLAG_TRIED -after retrying under per-VMA lock if VM_FAULT_MAJOR was returned. Ideally -we would use an additional VM_FAULT bit to indicate the reason for the -retry (could not handle under per-VMA lock vs other reason) but this -simpler solution seems to work, so keeping it simple. - -[1] https://cs.android.com/android/platform/superproject/+/master:test/vts-testcase/kernel/api/drop_caches_prop/drop_caches_test.cpp -[2] https://lore.kernel.org/all/20231006195318.4087158-6-willy@infradead.org/ - -Link: https://lkml.kernel.org/r/20231226214610.109282-1-surenb@google.com -Fixes: 12214eba1992 ("mm: handle read faults under the VMA lock") -Signed-off-by: Suren Baghdasaryan <surenb@google.com> -Cc: Matthew Wilcox <willy@infradead.org> -Cc: Alexander Gordeev <agordeev@linux.ibm.com> -Cc: Andy Lutomirski <luto@kernel.org> -Cc: Catalin Marinas <catalin.marinas@arm.com> -Cc: Christophe Leroy <christophe.leroy@csgroup.eu> -Cc: Dave Hansen <dave.hansen@linux.intel.com> -Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com> -Cc: Michael Ellerman <mpe@ellerman.id.au> -Cc: Palmer Dabbelt <palmer@dabbelt.com> -Cc: Peter Zijlstra <peterz@infradead.org> -Cc: Will Deacon <will@kernel.org> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> - -(cherry picked from commit 46e714c729c8d1d8110bc0545d7ffe8a759c9dc0 - https://git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm mm-hotfixes-stable) - -Bug: 317385399 -Change-Id: Ic7e97bf610dcabb7d3ac2306b2f1213be0ddd269 -Signed-off-by: Suren Baghdasaryan <surenb@google.com> ---- - arch/arm64/mm/fault.c | 2 ++ - arch/powerpc/mm/fault.c | 2 ++ - arch/riscv/mm/fault.c | 2 ++ - arch/s390/mm/fault.c | 3 +++ - arch/x86/mm/fault.c | 2 ++ - 5 files changed, 11 insertions(+) - -diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c ---- a/arch/arm64/mm/fault.c -+++ b/arch/arm64/mm/fault.c -@@ -607,6 +607,8 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr, - goto done; - } - count_vm_vma_lock_event(VMA_LOCK_RETRY); -+ if (fault & VM_FAULT_MAJOR) -+ mm_flags |= FAULT_FLAG_TRIED; - - /* Quick path to respond to signals */ - if (fault_signal_pending(fault, regs)) { -diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c ---- a/arch/powerpc/mm/fault.c -+++ b/arch/powerpc/mm/fault.c -@@ -497,6 +497,8 @@ static int ___do_page_fault(struct pt_regs *regs, unsigned long address, - goto done; - } - count_vm_vma_lock_event(VMA_LOCK_RETRY); -+ if (fault & VM_FAULT_MAJOR) -+ flags |= FAULT_FLAG_TRIED; - - if (fault_signal_pending(fault, regs)) - return user_mode(regs) ? 0 : SIGBUS; -diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c ---- a/arch/riscv/mm/fault.c -+++ b/arch/riscv/mm/fault.c -@@ -304,6 +304,8 @@ void handle_page_fault(struct pt_regs *regs) - goto done; - } - count_vm_vma_lock_event(VMA_LOCK_RETRY); -+ if (fault & VM_FAULT_MAJOR) -+ flags |= FAULT_FLAG_TRIED; - - if (fault_signal_pending(fault, regs)) { - if (!user_mode(regs)) -diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c ---- a/arch/s390/mm/fault.c -+++ b/arch/s390/mm/fault.c -@@ -337,6 +337,9 @@ static void do_exception(struct pt_regs *regs, int access) - return; - } - count_vm_vma_lock_event(VMA_LOCK_RETRY); -+ if (fault & VM_FAULT_MAJOR) -+ flags |= FAULT_FLAG_TRIED; -+ - /* Quick path to respond to signals */ - if (fault_signal_pending(fault, regs)) { - if (!user_mode(regs)) -diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c ---- a/arch/x86/mm/fault.c -+++ b/arch/x86/mm/fault.c -@@ -1370,6 +1370,8 @@ void do_user_addr_fault(struct pt_regs *regs, - goto done; - } - count_vm_vma_lock_event(VMA_LOCK_RETRY); -+ if (fault & VM_FAULT_MAJOR) -+ flags |= FAULT_FLAG_TRIED; - - /* Quick path to respond to signals */ - if (fault_signal_pending(fault, regs)) { diff --git a/android-mainline/series b/android-mainline/series index 34339cb7..2cfb3991 100644 --- a/android-mainline/series +++ b/android-mainline/series @@ -1,8 +1,8 @@ # # android-mainline patches # -# Applies onto upstream 0d3ac66ed81cb Linux v6.7-rc8-161-g0d3ac66ed81cb -# Matches android-mainline 22858186da5ac ("ANDROID: Revert "gen_compile_commands.py: fix path resolve with symlinks in it"") +# Applies onto upstream 95c8a35f1c017 Linux v6.7-rc8-174-g95c8a35f1c017 +# Matches android-mainline 34bd5a3324056 ("Merge 95c8a35f1c01 ("Merge tag 'mm-hotfixes-stable-2024-01-05-11-35' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm") into android-mainline") # Status: Tested # Revert-sched-core-Prevent-race-condition-between-cpuset-and-__sched_setscheduler.patch @@ -42,7 +42,6 @@ UPSTREAM-cpuidle-dt-Push-RCU-idle-into-driver.patch FROMLIST-kheaders-dereferences-the-source-tree.patch FROMLIST-Revert-fuse-Apply-flags2-only-when-userspace-set-the-FUSE_INIT_EXT.patch ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch -FROMGIT-arch-mm-fault-fix-major-fault-accounting-when-retrying-under-per-VMA-lock.patch _____ANNOTATION-binder-changes_____.patch ONHOLD-ANDROID-binder-add-support-for-RT-prio-inheritance.patch ANDROID-binder-fold-common-setup-of-node_prio.patch |