mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
49f8275c7d
Add memory folios, a new type to represent either order-0 pages or the head page of a compound page. This should be enough infrastructure to support filesystems converting from pages to folios. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEejHryeLBw/spnjHrDpNsjXcpgj4FAmF9uI0ACgkQDpNsjXcp gj7MUAf/R7LCZ+xFiIedw7SAgb/DGK0C9uVjuBEIZgAw21ZUw/GuPI6cuKBMFGGf rRcdtlvMpwi7yZJcoNXxaqU/xPaaJMjf2XxscIvYJP1mjlZVuwmP9dOx0neNvWOc T+8lqR6c1TLl82lpqIjGFLwvj2eVowq2d3J5jsaIJFd4odmmYVInrhJXOzC/LQ54 Niloj5ksehf+KUIRLDz7ycppvIHhlVsoAl0eM2dWBAtL0mvT7Nyn/3y+vnMfV2v3 Flb4opwJUgTJleYc16oxTn9svT2yS8q2uuUemRDLW8ABghoAtH3fUUk43RN+5Krd LYCtbeawtkikPVXZMfWybsx5vn0c3Q== =7SBe -----END PGP SIGNATURE----- Merge tag 'folio-5.16' of git://git.infradead.org/users/willy/pagecache Pull memory folios from Matthew Wilcox: "Add memory folios, a new type to represent either order-0 pages or the head page of a compound page. This should be enough infrastructure to support filesystems converting from pages to folios. The point of all this churn is to allow filesystems and the page cache to manage memory in larger chunks than PAGE_SIZE. The original plan was to use compound pages like THP does, but I ran into problems with some functions expecting only a head page while others expect the precise page containing a particular byte. The folio type allows a function to declare that it's expecting only a head page. Almost incidentally, this allows us to remove various calls to VM_BUG_ON(PageTail(page)) and compound_head(). This converts just parts of the core MM and the page cache. For 5.17, we intend to convert various filesystems (XFS and AFS are ready; other filesystems may make it) and also convert more of the MM and page cache to folios. For 5.18, multi-page folios should be ready. The multi-page folios offer some improvement to some workloads. The 80% win is real, but appears to be an artificial benchmark (postgres startup, which isn't a serious workload). Real workloads (eg building the kernel, running postgres in a steady state, etc) seem to benefit between 0-10%. I haven't heard of any performance losses as a result of this series. Nobody has done any serious performance tuning; I imagine that tweaking the readahead algorithm could provide some more interesting wins. There are also other places where we could choose to create large folios and currently do not, such as writes that are larger than PAGE_SIZE. I'd like to thank all my reviewers who've offered review/ack tags: Christoph Hellwig, David Howells, Jan Kara, Jeff Layton, Johannes Weiner, Kirill A. Shutemov, Michal Hocko, Mike Rapoport, Vlastimil Babka, William Kucharski, Yu Zhao and Zi Yan. I'd also like to thank those who gave feedback I incorporated but haven't offered up review tags for this part of the series: Nick Piggin, Mel Gorman, Ming Lei, Darrick Wong, Ted Ts'o, John Hubbard, Hugh Dickins, and probably a few others who I forget" * tag 'folio-5.16' of git://git.infradead.org/users/willy/pagecache: (90 commits) mm/writeback: Add folio_write_one mm/filemap: Add FGP_STABLE mm/filemap: Add filemap_get_folio mm/filemap: Convert mapping_get_entry to return a folio mm/filemap: Add filemap_add_folio() mm/filemap: Add filemap_alloc_folio mm/page_alloc: Add folio allocation functions mm/lru: Add folio_add_lru() mm/lru: Convert __pagevec_lru_add_fn to take a folio mm: Add folio_evictable() mm/workingset: Convert workingset_refault() to take a folio mm/filemap: Add readahead_folio() mm/filemap: Add folio_mkwrite_check_truncate() mm/filemap: Add i_blocks_per_folio() mm/writeback: Add folio_redirty_for_writepage() mm/writeback: Add folio_account_redirty() mm/writeback: Add folio_clear_dirty_for_io() mm/writeback: Add folio_cancel_dirty() mm/writeback: Add folio_account_cleaned() mm/writeback: Add filemap_dirty_folio() ... |
||
---|---|---|
.. | ||
9p.h | ||
afs.h | ||
alarmtimer.h | ||
asoc.h | ||
avc.h | ||
bcache.h | ||
block.h | ||
bpf_test_run.h | ||
bridge.h | ||
btrfs.h | ||
cachefiles.h | ||
cgroup.h | ||
clk.h | ||
cma.h | ||
compaction.h | ||
context_tracking.h | ||
cpuhp.h | ||
damon.h | ||
devfreq.h | ||
devlink.h | ||
dma_fence.h | ||
erofs.h | ||
error_report.h | ||
ext4.h | ||
f2fs.h | ||
fib6.h | ||
fib.h | ||
filelock.h | ||
filemap.h | ||
fs_dax.h | ||
fscache.h | ||
fsi_master_aspeed.h | ||
fsi_master_ast_cf.h | ||
fsi_master_gpio.h | ||
fsi.h | ||
gpio.h | ||
gpu_mem.h | ||
host1x.h | ||
huge_memory.h | ||
hwmon.h | ||
i2c.h | ||
ib_mad.h | ||
ib_umad.h | ||
initcall.h | ||
intel_iommu.h | ||
intel_ish.h | ||
intel-sst.h | ||
io_uring.h | ||
iocost.h | ||
iommu.h | ||
ipi.h | ||
irq_matrix.h | ||
irq.h | ||
iscsi.h | ||
jbd2.h | ||
kmem.h | ||
kvm.h | ||
kyber.h | ||
libata.h | ||
lock.h | ||
mce.h | ||
mdio.h | ||
migrate.h | ||
mlxsw.h | ||
mmap_lock.h | ||
mmap.h | ||
mmc.h | ||
mmflags.h | ||
module.h | ||
mptcp.h | ||
napi.h | ||
nbd.h | ||
neigh.h | ||
net_probe_common.h | ||
net.h | ||
netfs.h | ||
netlink.h | ||
nilfs2.h | ||
nmi.h | ||
objagg.h | ||
oom.h | ||
osnoise.h | ||
page_isolation.h | ||
page_pool.h | ||
page_ref.h | ||
pagemap.h | ||
percpu.h | ||
power_cpu_migrate.h | ||
power.h | ||
preemptirq.h | ||
printk.h | ||
pwc.h | ||
pwm.h | ||
qdisc.h | ||
qla.h | ||
qrtr.h | ||
random.h | ||
rcu.h | ||
rdma_core.h | ||
rdma.h | ||
regulator.h | ||
rpcgss.h | ||
rpcrdma.h | ||
rpm.h | ||
rseq.h | ||
rtc.h | ||
rxrpc.h | ||
sched.h | ||
scmi.h | ||
scsi.h | ||
sctp.h | ||
signal.h | ||
siox.h | ||
skb.h | ||
smbus.h | ||
sock.h | ||
spi.h | ||
spmi.h | ||
sunrpc.h | ||
sunvnet.h | ||
swiotlb.h | ||
syscalls.h | ||
target.h | ||
task.h | ||
tcp.h | ||
tegra_apb_dma.h | ||
thermal_power_allocator.h | ||
thermal.h | ||
thp.h | ||
timer.h | ||
tlb.h | ||
udp.h | ||
ufs.h | ||
v4l2.h | ||
vb2.h | ||
vmscan.h | ||
vsock_virtio_transport_common.h | ||
wbt.h | ||
workqueue.h | ||
writeback.h | ||
xdp.h | ||
xen.h |