Re: [PATCH v1 0/5] mm/shmem: optimize read with reduced xarray lookups and folio batching

From: Chi Zhiling

Date: Thu May 21 2026 - 21:38:35 EST


On 5/22/26 08:14, Andrew Morton wrote:
On Wed, 20 May 2026 18:15:33 +0800 Chi Zhiling <chizhiling@xxxxxxx> wrote:

From: Chi Zhiling <chizhiling@xxxxxxxxxx>

This series improves shmem read performance by implementing folio
batching in the read path and reducing unnecessary xarray lookups.


Thanks.

Performance Results
===================

Testing was performed with fio sequential read workloads:

fio --ioengine=sync --rw=read --size=1G --runtime=180


### THP Disabled - Normal Files ###

| Block Size | Baseline | v1 | Improvement |
| ---------- | --------- | --------- | ----------- |
| 1M | 11.4GiB/s | 12.7GiB/s | +11.4% |
| 64k | 11.2GiB/s | 12.2GiB/s | +8.9% |
| 4k | 3809MiB/s | 3838MiB/s | +0.8% |

### THP Disabled - Fallocated Files ###

| Block Size | Baseline | v1 | Improvement |
| ---------- | --------- | --------- | ----------- |
| 1M | 23.7GiB/s | 28.7GiB/s | +21.1% |
| 64k | 22.6GiB/s | 27.0GiB/s | +19.5% |
| 4k | 4668MiB/s | 4678MiB/s | +0.2% |

### THP Enabled - Normal Files ###

| Block Size | Baseline | v1 | Improvement |
| ---------- | --------- | --------- | ----------- |
| 1M | 13.9GiB/s | 13.9GiB/s | 0% |
| 64k | 13.4GiB/s | 13.4GiB/s | 0% |
| 4k | 3818MiB/s | 3836MiB/s | +0.5% |

### THP Enabled - Fallocated Files ###

| Block Size | Baseline | v1 | Improvement |
| ---------- | --------- | --------- | ----------- |
| 1M | 24.1GiB/s | 34.9GiB/s | +44.8% |
| 64k | 22.9GiB/s | 31.3GiB/s | +36.7% |
| 4k | 4721MiB/s | 4708MiB/s | -0.3% |

That looks nice.

AI review might have found a few things:
https://sashiko.dev/#/patchset/20260520101538.58745-1-chizhiling@xxxxxxx

I'll skip the patchset for now (unreviewed v1!).

Okay, I will fix those issues in v2.

Thanks!