linux/drivers
Christoph Hellwig a8efc69a65 shmem: provide a shmem_write_folio wrapper
Patch series "better block swap batching and a different take on swap_ops
v5".

This series makes use of the swap_iocb for block as well so that it
doesn't do inefficient single-bio I/O, and then rebases the swap_ops from
Baoquan on top of the now very different method structure.

When running doing kernels builds, which is a workload that doesn't really
do much THP anonymous memory it still gets 2x clustering for writeout and
1.2x for reading back swap in.  The overall times do not actually change,
though.


This patch (of 7):

Provide a wrapper for the shmem abuses in drm to prepare for swap I/O
refactoring by keeping swap_iocb handling entirely contained in mm/.

Link: https://lore.kernel.org/20260713093350.2154226-1-hch@lst.de
Link: https://lore.kernel.org/20260713093350.2154226-2-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Baoquan He <baoquan.he@linux.dev>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Chris Li <chrisl@kernel.org>
Reviewed-by: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Youngjun Park <youngjun.park@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-24 18:43:14 -07:00
..
accel accel/amdxdna: use hmm_range_fault_unlocked_timeout() for range population 2026-08-04 19:18:55 -07:00
accessibility
acpi ACPI support fixes for 7.2-rc2 2026-07-03 15:13:50 -10:00
amba
android rust_binder: only print failure if error has source 2026-07-17 15:30:09 +02:00
ata ata fixes for 7.2-rc4 2026-07-17 17:58:57 -07:00
atm atm: remove unused ATM PHY operations 2026-06-16 08:53:53 -07:00
auxdisplay Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
base drivers/base, mm: move arch_numa.c to mm/ 2026-08-24 18:43:10 -07:00
bcma
block zram: switch to unsigned long indexing 2026-08-24 18:43:06 -07:00
bluetooth Bluetooth: btusb: validate Realtek vendor event length 2026-07-20 17:41:28 -04:00
bus Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
cache Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
cdrom cdrom: fix stack out-of-bounds read in CDROMVOLCTRL 2026-07-20 21:54:52 -06:00
cdx Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
char tpm: Make the TPM character devices non-seekable 2026-07-12 12:52:34 -07:00
clk Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
clocksource A series of updates for the VDSO: 2026-06-15 13:57:13 +05:30
comedi comedi: comedi_parport: deal with premature interrupt 2026-07-17 14:50:35 +02:00
connector
counter Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
cpufreq cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq 2026-07-09 20:31:57 +02:00
cpuidle cpuidle: Allow exit latency to exceed target residency 2026-06-23 14:00:29 +02:00
crypto Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
cxl Merge branch 'for-7.2/cxl-type2-attach-region' into cxl-for-next 2026-06-12 13:47:53 -07:00
dax dax/kmem: add sysfs interface for atomic whole-device hotplug 2026-08-06 18:57:00 -07:00
dca
devfreq Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
dibs dibs: loopback: validate offset and size in move_data() 2026-07-09 12:44:00 +02:00
dio
dma Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
dma-buf udmabuf: Ensure to perform cache synchronisation in begin_cpu_udmabuf() 2026-07-10 16:26:39 -07:00
dpll dpll: fix NULL pointer dereference in dpll_msg_add_pin_ref_sync() 2026-07-17 12:02:23 +02:00
edac Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
eisa
extcon Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
firewire firewire: net: Fix fragmented datagram reassembly 2026-07-13 20:19:06 +09:00
firmware Char/Misc driver fixes for 7.2-rc5 2026-07-26 10:47:58 -07:00
fpga Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
fsi Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
fwctl
gnss
gpib Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
gpio gpio: mvebu: free generic chips on unbind 2026-07-08 14:05:11 +02:00
gpu shmem: provide a shmem_write_folio wrapper 2026-08-24 18:43:14 -07:00
greybus
hid Android/IIO bugfixes for 7.2-rc3 2026-07-12 12:37:28 -07:00
hsi Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
hte Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
hv mshv: use hmm_range_fault_unlocked_timeout() for region faults 2026-08-04 19:18:54 -07:00
hwmon hwmon: occ: validate poll response sensor blocks 2026-07-20 07:29:44 -07:00
hwspinlock hwspinlock: qcom: avoid uninitialized struct members 2026-06-08 21:51:12 -05:00
hwtracing intel_th: fix MSC output device reference leak 2026-07-17 14:52:08 +02:00
i2c i2c: mediatek: fix WRRD for SoCs without auto_restart option 2026-07-15 00:21:51 +02:00
i3c i3c: mipi-i3c-hci: Use named initializers for platform_device_id's .driver_data 2026-06-16 23:19:45 +02:00
idle x86/msr updates for v7.2: 2026-06-15 15:08:14 +05:30
iio Android/IIO bugfixes for 7.2-rc3 2026-07-12 12:37:28 -07:00
infiniband RDMA/umem: use hmm_range_fault_unlocked_timeout() for ODP faults 2026-08-04 19:18:55 -07:00
input Input updates for v7.2-rc2 2026-07-11 15:42:55 -07:00
interconnect Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
iommu iommu/intel: Fix out-of-bounds memset in dmar_latency_disable() 2026-07-21 11:34:51 +00:00
ipack
irqchip Misc irqchip driver fixes: 2026-07-05 05:29:41 -10:00
leds Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
macintosh
mailbox Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mcb
md dm thin metadata: fix superblock refcount leak on snapshot shadow failure 2026-07-11 15:18:51 +02:00
media Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
memory Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
memstick memstick: ms_block: reject a card that reports too many blocks 2026-07-06 17:09:30 +02:00
message
mfd Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
misc sgi-xp: use higher-level allocator API 2026-07-30 19:40:42 -07:00
mmc mmc: sdhci-esdhc-imx: fix resume error handling 2026-07-15 11:00:02 +02:00
most
mtd Among the most important fixes that we have here, there are: 2026-07-17 09:30:17 -07:00
mux Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
net net/funeth: switch to higher-level allocator API 2026-07-30 19:40:43 -07:00
nfc Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ntb NTB updates include an EPF bug fix to prevent an invalid unmap during 2026-06-28 07:46:12 -07:00
nubus
nvdimm Updates for the 7.2 release 2026-06-18 16:27:58 -07:00
nvme block-7.2-20260625 2026-06-25 09:56:47 -07:00
nvmem Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
of Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
opp
parisc
parport
pci Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
pcmcia
peci
perf Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
phy Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
pinctrl Pin control fixes for the v7.2 series: 2026-07-27 08:48:48 -07:00
platform LoongArch fixes for v7.2-rc5 2026-07-25 08:10:13 -07:00
pmdomain pmdomain: mediatek: Fix possible nullptr KP in HWV cleanup/on-check 2026-07-13 12:42:17 +02:00
pnp Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
power Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
powercap
pps Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ps3
ptp ptp: netc: explicitly clear TMR_OFF during initialization 2026-07-23 09:16:14 -07:00
pwm Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
rapidio mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
ras - Fix a malformed Kconfig default for the AMD Address Translation Library 2026-06-16 05:31:01 +05:30
regulator regulator: core: clamp voltage constraints before applying apply_uV 2026-07-21 22:35:08 +01:00
remoteproc remoteproc: qcom: pas: Drop start/stop completion from struct qcom_pas 2026-06-08 21:53:51 -05:00
resctrl arm_mpam: guard MBWU state before adding it to garbage 2026-07-16 14:46:27 +01:00
reset Reset controller fixes for v7.2 2026-07-10 14:15:39 +02:00
rpmsg rpmsg update for v7.2 2026-06-20 23:31:15 -07:00
rtc Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
s390 s390/zcrypt: Remove the empty file 2026-07-08 17:02:47 +02:00
sbus
scsi scsi: hpsa: Fix DMA mapping leak on IOACCEL2 reset path 2026-07-12 22:21:22 -04:00
sh
siox Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
slimbus
soc soc/tegra: Fixes for v7.2 2026-07-10 14:42:00 +02:00
soundwire Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
spi spi: spacemit: Correct TX FIFO slot calculation 2026-07-19 22:12:52 +01:00
spmi Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ssb
staging staging: rtl8723bs: fix OOB reads in rtw_get_wps_ie() 2026-07-17 14:23:13 +02:00
target scsi: target: core: Fix iSCSI ISID use-after-free in REGISTER AND MOVE 2026-07-12 22:21:22 -04:00
tc
tee soc: drivers for 7.2 2026-06-17 11:21:40 -07:00
thermal Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
thunderbolt USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
tty serial: sc16is7xx: implement gpio get_direction() callback 2026-07-17 13:07:32 +02:00
ufs scsi: ufs: core: tracing: Do not dereference pointers in TP_printk() 2026-07-08 21:51:36 -04:00
uio uio_hv_generic: Bind to FCopy device by default 2026-07-17 14:50:09 +02:00
usb USB serial fixes for 7.2-rc4 2026-07-24 15:36:52 +02:00
vdpa Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
vfio mm: use linear_page_[index, delta]() consistently 2026-08-04 19:19:01 -07:00
vhost vhost-net: fix TX stall when vhost owns virtio-net header 2026-07-21 13:25:34 +02:00
video mm: introduce vma_get_page_prot() and use it 2026-08-06 18:57:03 -07:00
virt drivers/virt: pkvm: Fix end calculation in mmio_guard_ioremap_hook() 2026-07-17 18:49:12 +01:00
virtio mm: page_reporting: allow driver to set batch capacity 2026-07-09 15:48:56 -07:00
w1 Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
watchdog watchdog fixes for v7.2-rc5 2026-07-22 11:15:49 -07:00
xen SCSI fixes on 20260718 2026-07-18 12:36:19 -07:00
zorro
Kconfig
Makefile