No description
  • C 96.8%
  • Assembly 0.9%
  • Rust 0.7%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Darrick J. Wong d42bd17c6a Create large folios in iomap buffered write path
Commit ebb7fb1557 limited the length of ioend chains to 4096 entries
 to improve worst-case latency.  Unfortunately, this had the effect of
 limiting the performance of:
 
 fio -name write-bandwidth -rw=write -bs=1024Ki -size=32Gi -runtime=30 \
         -iodepth 1 -ioengine sync -zero_buffers=1 -direct=0 -end_fsync=1 \
         -numjobs=4 -directory=/mnt/test
 
 https://lore.kernel.org/linux-xfs/20230508172406.1CF3.409509F4@e16-tech.com/
 
 The problem ends up being lock contention on the i_pages spinlock as we
 clear the writeback bit on each folio (and propagate that up through
 the tree).  By using larger folios, we decrease the number of folios
 to be processed by a factor of 256 for this benchmark, eliminating the
 lock contention.
 
 Creating large folios in the buffered write path is also the right
 thing to do.  It's a project that has been on the back burner for years,
 it just hasn't been important enough to do before now.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEejHryeLBw/spnjHrDpNsjXcpgj4FAmS+/8YACgkQDpNsjXcp
 gj6jwgf/YpI9mbo63D55QRpMVhvej10aGxZj497IJW5bEqh5cRX0x+kUZkMOW36a
 iBB4iiTT+Gl6Z7eJ89W4J7Es48k8hHaprh1WGjlI0zHmBhXvNGHKSk7Egno1BS2v
 23YEzBGOdA6dlhDLA9PNIiV5berwTxyNbdv/PadKxDcWy65UvwZ8FCQfli9E0CP6
 aeG8PU8RybagYUQYQuCU7TgcCJNpthJHmYBy+iJEZy/9JI0klYvHUaLo6hl1wgXw
 Cthc63C4lYtCY/koHFaD8W24RYAZQF+BMTE6oL6X+tA70fRL7ozCGtu4Mjk55kmJ
 yNkVqw2ImTuwLRxfxPyEp23Iwz9alA==
 =WE72
 -----END PGP SIGNATURE-----

Merge tag 'large-folio-writes' of git://git.infradead.org/users/willy/pagecache into iomap-6.6-merge

Create large folios in iomap buffered write path

Commit ebb7fb1557 limited the length of ioend chains to 4096 entries
to improve worst-case latency.  Unfortunately, this had the effect of
limiting the performance of:

fio -name write-bandwidth -rw=write -bs=1024Ki -size=32Gi -runtime=30 \
        -iodepth 1 -ioengine sync -zero_buffers=1 -direct=0 -end_fsync=1 \
        -numjobs=4 -directory=/mnt/test

https://lore.kernel.org/linux-xfs/20230508172406.1CF3.409509F4@e16-tech.com/

The problem ends up being lock contention on the i_pages spinlock as we
clear the writeback bit on each folio (and propagate that up through
the tree).  By using larger folios, we decrease the number of folios
to be processed by a factor of 256 for this benchmark, eliminating the
lock contention.

Creating large folios in the buffered write path is also the right
thing to do.  It's a project that has been on the back burner for years,
it just hasn't been important enough to do before now.

* tag 'large-folio-writes' of git://git.infradead.org/users/willy/pagecache:
  iomap: Copy larger chunks from userspace
  iomap: Create large folios in the buffered write path
  filemap: Allow __filemap_get_folio to allocate large folios
  filemap: Add fgf_t typedef
  iomap: Remove unnecessary test from iomap_release_folio()
  doc: Correct the description of ->release_folio
  iomap: Remove large folio handling in iomap_invalidate_folio()
  iov_iter: Add copy_folio_from_iter_atomic()
  iov_iter: Handle compound highmem pages in copy_page_from_iter_atomic()
  iov_iter: Map the page later in copy_page_from_iter_atomic()

[djwong: yay amortizations!]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
History 2023-07-24 16:12:29 -07:00
arch
block
certs
crypto
Documentation
drivers
fs
include
init
io_uring
ipc
kernel
lib
LICENSES
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.