]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: buffered write prefaulting
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 4 May 2022 21:37:30 +0000 (23:37 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 13 May 2022 20:32:52 +0000 (22:32 +0200)
commit48190803b320f34beaa6e46f3b94cc59915fe308
tree28e84df2c127259d0e317881e1a4c4ceb1698f05
parentbe0d4e57ac8b242efc248c0126ef06a37c847770
gfs2: buffered write prefaulting

In gfs2_file_buffered_write, to increase the likelihood that all the
user memory we're trying to write will be resident in memory, carry out
the write in chunks and fault in each chunk of user memory before trying
to write it.  Otherwise, some workloads will trigger frequent short
"internal" writes, causing filesystem blocks to be allocated and then
partially deallocated again when writing into holes, which is wasteful
and breaks reservations.

Neither the chunked writes nor any of the short "internal" writes are
user visible.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c