Re: [PATCH v2 00/47] mm: various (urgent?) fixes
From: Muhammad Usama Anjum
Date: Fri Oct 30 2026 - 07:25:18 EST
On 29/10/2026 8:32 pm, David Hildenbrand (Arm) wrote:
> See v1 on details. TL;DR various fixes :)
>
> Thanks to everyone for the review! Hoping I can get some more? :)
>
> I am planning on picking these myself, moving them to linux-next fairly
> soon through mm/core.git.
>
> ---
> Changes in v2:
> - "mm/memfd: check for real shmem inodes before accessing shmem state"
> - Call it inode_is_shmem
> - "mm/truncate: look again if a folio left the mapping"
> - Different fix for truncate_inode_pages_range
> - Adjust description
> - "mm/huge_memory: fix zapping migration entries for device-private THPs"
> - Move handling in zap_deposited_table
> - "mm/mmu_gather: fix flushing ranges with 4 GiB or larger"
> - Adjust description"
> - "mm/huge_memory: split huge PUDs when adjusting VMA boundaries"
> - Drop split_pud check
> - Link to v1: https://patch.msgid.link/20261027-fixes_core-v1-0-6f74bec9a5bb@xxxxxxxxxx
I ran Fastpath, a Linux kernel performance benchmarking framework, on
this series against mm-stable on aws-m7g.metal. (I) and (R) indicate
statistically significant improvements and regressions, respectively.
The results show 10 improvements and 1 regression. Other, unmarked
percentage changes can be ignored as statistically insignificant. Hence:
Tested-by: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
Results for SUT Class aws-m7g.metal (arm64):
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| Benchmark | Result Class | mm-stable | this patch |
+=================================+==========================================================+================+=============+
| lmbench/lat-mem-rd | size:4MB P:1 stride:128B rnd_read_lat (ns) | 24.95 | -2.64% |
| | size:4MB P:1 stride:128B seq_read_lat (ns) | 2.95 | -1.76% |
| | size:16MB P:1 stride:128B rnd_read_lat (ns) | 27.89 | -2.70% |
| | size:16MB P:1 stride:128B seq_read_lat (ns) | 2.88 | -1.19% |
| | size:64MB P:1 stride:128B rnd_read_lat (ns) | 101.59 | -0.32% |
| | size:64MB P:1 stride:128B seq_read_lat (ns) | 5.43 | -0.82% |
| | size:256MB P:1 stride:128B rnd_read_lat (ns) | 113.17 | -0.29% |
| | size:256MB P:1 stride:128B seq_read_lat (ns) | 5.57 | -0.30% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| micromm/fork | fork: p:1, d:10 (seconds) | 0.0074 | -3.29% |
| | fork: p:16, d:10 (seconds) | 0.0061 | 0.25% |
| | fork: p:512, d:10 (seconds) | 0.0055 | 0.36% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| micromm/munmap | munmap: p:1, d:10 (seconds) | 0.043 | -0.51% |
| | munmap: p:16, d:10 (seconds) | 0.0081 | -0.50% |
| | munmap: p:512, d:10 (seconds) | 0.0042 | 0.70% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| micromm/vmalloc | fix_align_alloc_test: p:1, h:0, l:500000 (usec) | 582591.50 | 0.65% |
| | fix_size_alloc_test: p:1, h:0, l:500000 (usec) | 361468.33 | 1.46% |
| | fix_size_alloc_test: p:4, h:0, l:500000 (usec) | 419288.33 | 0.73% |
| | fix_size_alloc_test: p:16, h:0, l:500000 (usec) | 733574.83 | 0.61% |
| | fix_size_alloc_test: p:16, h:1, l:500000 (usec) | 699803.67 | 0.39% |
| | fix_size_alloc_test: p:64, h:0, l:100000 (usec) | 394392.00 | 0.07% |
| | fix_size_alloc_test: p:64, h:1, l:100000 (usec) | 378722.67 | 0.07% |
| | fix_size_alloc_test: p:256, h:0, l:100000 (usec) | 1399837.00 | -0.24% |
| | fix_size_alloc_test: p:256, h:1, l:100000 (usec) | 1355183.33 | -0.76% |
| | fix_size_alloc_test: p:512, h:0, l:100000 (usec) | 2724934.00 | -0.37% |
| | fix_size_alloc_test: p:512, h:1, l:100000 (usec) | 1915856.17 | -0.19% |
| | full_fit_alloc_test: p:1, h:0, l:500000 (usec) | 563338.00 | 1.51% |
| | kvfree_rcu_1_arg_vmalloc_test: p:1, h:0, l:500000 (usec) | 370179.17 | 0.12% |
| | kvfree_rcu_2_arg_vmalloc_test: p:1, h:0, l:500000 (usec) | 367558.00 | -0.50% |
| | long_busy_list_alloc_test: p:1, h:0, l:500000 (usec) | 3532591.00 | -0.06% |
| | pcpu_alloc_test: p:1, h:0, l:500000 (usec) | 192186.33 | -0.87% |
| | random_size_align_alloc_test: p:1, h:0, l:500000 (usec) | 691912.83 | -0.66% |
| | random_size_alloc_test: p:1, h:0, l:500000 (usec) | 1856151.83 | -0.08% |
| | vm_map_ram_test: p:1, h:0, l:500000 (usec) | 80702.00 | -0.20% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| mmtests/hackbench | hackbench-process-pipes-1 (seconds) | 0.14 | -1.25% |
| | hackbench-process-pipes-4 (seconds) | 0.39 | 1.72% |
| | hackbench-process-pipes-7 (seconds) | 0.67 | 1.34% |
| | hackbench-process-pipes-12 (seconds) | 1.11 | 1.06% |
| | hackbench-process-pipes-21 (seconds) | 1.46 | 0.84% |
| | hackbench-process-pipes-30 (seconds) | 1.84 | 0.71% |
| | hackbench-process-pipes-48 (seconds) | 2.52 | 0.82% |
| | hackbench-process-pipes-79 (seconds) | 3.56 | 1.30% |
| | hackbench-process-pipes-110 (seconds) | 4.60 | 0.76% |
| | hackbench-process-pipes-141 (seconds) | 5.68 | 1.21% |
| | hackbench-process-pipes-172 (seconds) | 6.81 | 0.64% |
| | hackbench-process-pipes-203 (seconds) | 7.94 | 0.62% |
| | hackbench-process-pipes-234 (seconds) | 9.10 | 0.74% |
| | hackbench-process-pipes-256 (seconds) | 9.90 | 0.65% |
| | hackbench-process-sockets-1 (seconds) | 0.26 | -0.57% |
| | hackbench-process-sockets-4 (seconds) | 0.61 | 0.08% |
| | hackbench-process-sockets-7 (seconds) | 0.98 | 0.19% |
| | hackbench-process-sockets-12 (seconds) | 1.59 | 0.35% |
| | hackbench-process-sockets-21 (seconds) | 2.73 | 0.18% |
| | hackbench-process-sockets-30 (seconds) | 3.89 | 0.17% |
| | hackbench-process-sockets-48 (seconds) | 6.23 | 0.24% |
| | hackbench-process-sockets-79 (seconds) | 9.67 | 0.36% |
| | hackbench-process-sockets-110 (seconds) | 13.47 | 0.58% |
| | hackbench-process-sockets-141 (seconds) | 17.36 | 0.48% |
| | hackbench-process-sockets-172 (seconds) | 21.52 | 0.60% |
| | hackbench-process-sockets-203 (seconds) | 25.68 | 0.39% |
| | hackbench-process-sockets-234 (seconds) | 30.06 | 0.57% |
| | hackbench-process-sockets-256 (seconds) | 33.10 | 0.42% |
| | hackbench-thread-pipes-1 (seconds) | 0.18 | 0.95% |
| | hackbench-thread-pipes-4 (seconds) | 0.40 | 0.25% |
| | hackbench-thread-pipes-7 (seconds) | 0.67 | -1.28% |
| | hackbench-thread-pipes-12 (seconds) | 1.13 | -0.76% |
| | hackbench-thread-pipes-21 (seconds) | 1.50 | 0.07% |
| | hackbench-thread-pipes-30 (seconds) | 1.91 | 0.11% |
| | hackbench-thread-pipes-48 (seconds) | 2.64 | -0.09% |
| | hackbench-thread-pipes-79 (seconds) | 3.63 | -0.28% |
| | hackbench-thread-pipes-110 (seconds) | 4.75 | -0.30% |
| | hackbench-thread-pipes-141 (seconds) | 5.89 | -0.25% |
| | hackbench-thread-pipes-172 (seconds) | 7.10 | -0.31% |
| | hackbench-thread-pipes-203 (seconds) | 8.31 | -0.15% |
| | hackbench-thread-pipes-234 (seconds) | 9.54 | -0.23% |
| | hackbench-thread-pipes-256 (seconds) | 10.39 | -0.31% |
| | hackbench-thread-sockets-1 (seconds) | 0.28 | 0.84% |
| | hackbench-thread-sockets-4 (seconds) | 0.63 | -0.05% |
| | hackbench-thread-sockets-7 (seconds) | 0.99 | -0.15% |
| | hackbench-thread-sockets-12 (seconds) | 1.58 | 0.25% |
| | hackbench-thread-sockets-21 (seconds) | 2.70 | 0.07% |
| | hackbench-thread-sockets-30 (seconds) | 3.83 | 0.24% |
| | hackbench-thread-sockets-48 (seconds) | 6.08 | 0.26% |
| | hackbench-thread-sockets-79 (seconds) | 9.44 | 0.45% |
| | hackbench-thread-sockets-110 (seconds) | 13.13 | 0.53% |
| | hackbench-thread-sockets-141 (seconds) | 16.94 | 0.75% |
| | hackbench-thread-sockets-172 (seconds) | 21.07 | 0.93% |
| | hackbench-thread-sockets-203 (seconds) | 25.18 | 0.82% |
| | hackbench-thread-sockets-234 (seconds) | 29.40 | 0.65% |
| | hackbench-thread-sockets-256 (seconds) | 32.39 | 0.64% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| mmtests/kernbench | kernbench-elsp-64 (seconds) | 359.59 | 0.05% |
| | kernbench-syst-64 (seconds) | 1084.06 | 1.31% |
| | kernbench-user-64 (seconds) | 19753.52 | 0.07% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| mmtests/sysbench-cpu | sysbenchcpu-1 (ops/second) | 835.59 | -0.01% |
| | sysbenchcpu-4 (ops/second) | 3342.07 | 0.00% |
| | sysbenchcpu-7 (ops/second) | 5848.46 | 0.00% |
| | sysbenchcpu-12 (ops/second) | 10025.89 | -0.00% |
| | sysbenchcpu-21 (ops/second) | 17544.27 | -0.00% |
| | sysbenchcpu-30 (ops/second) | 25061.51 | -0.00% |
| | sysbenchcpu-48 (ops/second) | 40094.33 | -0.01% |
| | sysbenchcpu-79 (ops/second) | 53449.56 | -0.00% |
| | sysbenchcpu-110 (ops/second) | 53441.85 | -0.00% |
| | sysbenchcpu-128 (ops/second) | 53438.27 | -0.00% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| mmtests/sysbench-mutex | sysbenchmutex-1 (usec) | 194.35 | 0.04% |
| | sysbenchmutex-4 (usec) | 200.54 | -0.12% |
| | sysbenchmutex-7 (usec) | 200.98 | 0.04% |
| | sysbenchmutex-12 (usec) | 201.34 | -0.14% |
| | sysbenchmutex-21 (usec) | 202.08 | -0.17% |
| | sysbenchmutex-30 (usec) | 202.87 | -0.34% |
| | sysbenchmutex-48 (usec) | 235.24 | 0.58% |
| | sysbenchmutex-79 (usec) | 362.89 | 0.03% |
| | sysbenchmutex-110 (usec) | 495.17 | -4.54% |
| | sysbenchmutex-128 (usec) | 599.52 | 3.37% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| mmtests/sysbench-thread | sysbenchthread-1 (usec) | 0.36 | -0.62% |
| | sysbenchthread-4 (usec) | 0.52 | -0.77% |
| | sysbenchthread-7 (usec) | 2.85 | 4.31% |
| | sysbenchthread-12 (usec) | 6.42 | -0.19% |
| | sysbenchthread-21 (usec) | 13.52 | -5.83% |
| | sysbenchthread-30 (usec) | 17.14 | 6.86% |
| | sysbenchthread-48 (usec) | 30.64 | 2.04% |
| | sysbenchthread-79 (usec) | 62.83 | 3.59% |
| | sysbenchthread-110 (usec) | 95.75 | 0.87% |
| | sysbenchthread-128 (usec) | 112.12 | -0.27% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| perf/futex | hash (ops/sec) | 2661114.13 | -1.22% |
| | lock-pi (ops/sec) | 281.00 | 0.00% |
| | requeue (ms) | 0.028 | 6.37% |
| | wake (ms) | 0.079 | 6.65% |
| | wake-parallel (ms) | 0.0044 | 2.47% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| perf/mem | memset -k 1GB -f default -s 16GB (bytes/sec) | 65384265194.20 | -1.20% |
| | mmap -p 1GB -f demand -s 32GB -l 5 (bytes/sec) | 63873483711.66 | -0.51% |
| | mmap -p 4KB -f demand -s 32GB -l 5 (bytes/sec) | 50086884685.75 | 0.33% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| perf/sched | messaging -l 10000 (sec) | 1.32 | 1.11% |
| | pipe (ops/sec) | 746693.53 | (I) 10.81% |
| | seccomp-notify (ops/sec) | 239242.23 | 0.99% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| perf/syscall | basic (ops/sec) | 5120478.20 | (I) 3.58% |
| | execve (ops/sec) | 2361.40 | (I) 3.32% |
| | fork (ops/sec) | 4036.27 | (I) 5.89% |
| | getpgid (ops/sec) | 5263958.43 | -0.51% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/memtier-benchmark | Protocol: Redis Clients: 50 Ratio: 1:1 (Ops/sec) | 1881192.47 | 1.76% |
| | Protocol: Redis Clients: 50 Ratio: 1:5 (Ops/sec) | 2029301.38 | 1.10% |
| | Protocol: Redis Clients: 50 Ratio: 5:1 (Ops/sec) | 1676141.91 | 1.81% |
| | Protocol: Redis Clients: 100 Ratio: 1:1 (Ops/sec) | 1887013.22 | 1.44% |
| | Protocol: Redis Clients: 100 Ratio: 1:5 (Ops/sec) | 1992665.04 | (I) 5.00% |
| | Protocol: Redis Clients: 100 Ratio: 5:1 (Ops/sec) | 1796984.06 | -1.13% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/nginx | Connections: 200 (Requests Per Second) | 265772.36 | 0.15% |
| | Connections: 1000 (Requests Per Second) | 256136.45 | 0.23% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/perl-benchmark | Test: Interpreter (Seconds) | 0.0011 | (I) 12.50% |
| | Test: Pod2html (Seconds) | 0.12 | 0.71% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/pybench | Total For Average Test Times (Milliseconds) | 1005.50 | -0.02% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/redis | Test: GET Connections: 50 (Requests Per Second) | 2265966.17 | 1.63% |
| | Test: GET Connections: 1000 (Requests Per Second) | 2219967.42 | 1.40% |
| | Test: LPOP Connections: 50 (Requests Per Second) | 1569488.21 | 2.28% |
| | Test: LPOP Connections: 1000 (Requests Per Second) | 1551803.58 | 2.42% |
| | Test: LPUSH Connections: 50 (Requests Per Second) | 1525781.50 | 2.68% |
| | Test: LPUSH Connections: 1000 (Requests Per Second) | 1428476.58 | 2.60% |
| | Test: SADD Connections: 50 (Requests Per Second) | 2030311.52 | 1.26% |
| | Test: SADD Connections: 1000 (Requests Per Second) | 2004562.54 | 1.64% |
| | Test: SET Connections: 50 (Requests Per Second) | 1839073.31 | 0.64% |
| | Test: SET Connections: 1000 (Requests Per Second) | 1806245.08 | 1.11% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| pts/sqlite-speedtest | Timed Time - Size 1,000 (Seconds) | 75.65 | 1.63% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| repro-collection/mysql-workload | db transaction rate (transactions/min) | 236380.17 | 0.65% |
| | new order rate (orders/min) | 77978.33 | 0.69% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| schbench/thread-contention | -m 16 -t 1 -r 10 -s 1000, avg_rps (req/sec) | 1360.03 | 1.79% |
| | -m 16 -t 1 -r 10 -s 1000, req_latency_p99 (usec) | 15084.80 | -0.06% |
| | -m 16 -t 1 -r 10 -s 1000, wakeup_latency_p99 (usec) | 3.00 | 0.00% |
| | -m 16 -t 4 -r 10 -s 1000, avg_rps (req/sec) | 4367.47 | (I) 20.95% |
| | -m 16 -t 4 -r 10 -s 1000, req_latency_p99 (usec) | 15141.60 | 0.02% |
| | -m 16 -t 4 -r 10 -s 1000, wakeup_latency_p99 (usec) | 4.15 | (R) -13.99% |
| | -m 16 -t 16 -r 10 -s 1000, avg_rps (req/sec) | 1331.22 | 3.94% |
| | -m 16 -t 16 -r 10 -s 1000, req_latency_p99 (usec) | 950041.60 | 1.54% |
| | -m 16 -t 16 -r 10 -s 1000, wakeup_latency_p99 (usec) | 15538.40 | -1.25% |
| | -m 16 -t 64 -r 10 -s 1000, avg_rps (req/sec) | 433.65 | -0.14% |
| | -m 16 -t 64 -r 10 -s 1000, req_latency_p99 (usec) | 11090329.60 | -0.18% |
| | -m 16 -t 64 -r 10 -s 1000, wakeup_latency_p99 (usec) | 64028.80 | -0.15% |
| | -m 32 -t 1 -r 10 -s 1000, avg_rps (req/sec) | 2962.10 | 4.76% |
| | -m 32 -t 1 -r 10 -s 1000, req_latency_p99 (usec) | 15096.80 | -0.03% |
| | -m 32 -t 1 -r 10 -s 1000, wakeup_latency_p99 (usec) | 3.00 | 0.00% |
| | -m 32 -t 4 -r 10 -s 1000, avg_rps (req/sec) | 2365.75 | (I) 10.92% |
| | -m 32 -t 4 -r 10 -s 1000, req_latency_p99 (usec) | 56864.00 | -0.45% |
| | -m 32 -t 4 -r 10 -s 1000, wakeup_latency_p99 (usec) | 6064.00 | -0.07% |
| | -m 32 -t 16 -r 10 -s 1000, avg_rps (req/sec) | 709.63 | 1.97% |
| | -m 32 -t 16 -r 10 -s 1000, req_latency_p99 (usec) | 3780096.00 | -1.87% |
| | -m 32 -t 16 -r 10 -s 1000, wakeup_latency_p99 (usec) | 31720.00 | 0.57% |
| | -m 32 -t 64 -r 10 -s 1000, avg_rps (req/sec) | 387.14 | 0.21% |
| | -m 32 -t 64 -r 10 -s 1000, req_latency_p99 (usec) | 16696524.80 | 0.00% |
| | -m 32 -t 64 -r 10 -s 1000, wakeup_latency_p99 (usec) | 126131.20 | -0.15% |
| | -m 64 -t 1 -r 10 -s 1000, avg_rps (req/sec) | 6545.98 | 1.53% |
| | -m 64 -t 1 -r 10 -s 1000, req_latency_p99 (usec) | 15108.00 | -0.05% |
| | -m 64 -t 1 -r 10 -s 1000, wakeup_latency_p99 (usec) | 4.00 | 0.00% |
| | -m 64 -t 4 -r 10 -s 1000, avg_rps (req/sec) | 1243.98 | 0.56% |
| | -m 64 -t 4 -r 10 -s 1000, req_latency_p99 (usec) | 910310.40 | -0.17% |
| | -m 64 -t 4 -r 10 -s 1000, wakeup_latency_p99 (usec) | 13161.60 | -0.07% |
| | -m 64 -t 16 -r 10 -s 1000, avg_rps (req/sec) | 456.27 | 0.02% |
| | -m 64 -t 16 -r 10 -s 1000, req_latency_p99 (usec) | 11055104.00 | -0.20% |
| | -m 64 -t 16 -r 10 -s 1000, wakeup_latency_p99 (usec) | 61657.60 | -1.58% |
| | -m 64 -t 64 -r 10 -s 1000, avg_rps (req/sec) | 535.45 | 0.14% |
| | -m 64 -t 64 -r 10 -s 1000, req_latency_p99 (usec) | 36939366.40 | -0.02% |
| | -m 64 -t 64 -r 10 -s 1000, wakeup_latency_p99 (usec) | 241779.20 | -0.33% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| specjbb/composite | critical-jOPS (jOPS) | 95699.00 | (I) 2.13% |
| | max-jOPS (jOPS) | 116191.00 | 1.27% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| speedometer/v2.0 | score (runs/min) | 154.50 | 1.51% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
| speedometer/v2.1 | score (runs/min) | 161.67 | (I) 2.78% |
+---------------------------------+----------------------------------------------------------+----------------+-------------+
--
Thanks,
Usama