mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
xfs: drop ->writepage completely
->writepage is only used in one place - single page writeback from memory reclaim. We only allow such writeback from kswapd, not from direct memory reclaim, and so it is rarely used. When it comes from kswapd, it is effectively random dirty page shoot-down, which is horrible for IO patterns. We will already have background writeback trying to clean all the dirty pages in memory as efficiently as possible, so having kswapd interrupt our well formed IO stream only slows things down. So get rid of xfs_vm_writepage() completely. Signed-off-by: Dave Chinner <dchinner@redhat.com> [djwong: forward port to 5.15] Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
parent
33c0dd7898
commit
21b4ee7029
1 changed files with 0 additions and 17 deletions
|
@ -461,22 +461,6 @@ static const struct iomap_writeback_ops xfs_writeback_ops = {
|
||||||
.discard_page = xfs_discard_page,
|
.discard_page = xfs_discard_page,
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC int
|
|
||||||
xfs_vm_writepage(
|
|
||||||
struct page *page,
|
|
||||||
struct writeback_control *wbc)
|
|
||||||
{
|
|
||||||
struct xfs_writepage_ctx wpc = { };
|
|
||||||
|
|
||||||
if (WARN_ON_ONCE(current->journal_info)) {
|
|
||||||
redirty_page_for_writepage(wbc, page);
|
|
||||||
unlock_page(page);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return iomap_writepage(page, wbc, &wpc.ctx, &xfs_writeback_ops);
|
|
||||||
}
|
|
||||||
|
|
||||||
STATIC int
|
STATIC int
|
||||||
xfs_vm_writepages(
|
xfs_vm_writepages(
|
||||||
struct address_space *mapping,
|
struct address_space *mapping,
|
||||||
|
@ -559,7 +543,6 @@ xfs_iomap_swapfile_activate(
|
||||||
const struct address_space_operations xfs_address_space_operations = {
|
const struct address_space_operations xfs_address_space_operations = {
|
||||||
.readpage = xfs_vm_readpage,
|
.readpage = xfs_vm_readpage,
|
||||||
.readahead = xfs_vm_readahead,
|
.readahead = xfs_vm_readahead,
|
||||||
.writepage = xfs_vm_writepage,
|
|
||||||
.writepages = xfs_vm_writepages,
|
.writepages = xfs_vm_writepages,
|
||||||
.set_page_dirty = __set_page_dirty_nobuffers,
|
.set_page_dirty = __set_page_dirty_nobuffers,
|
||||||
.releasepage = iomap_releasepage,
|
.releasepage = iomap_releasepage,
|
||||||
|
|
Loading…
Reference in a new issue