From: Mike Snitzer <snitzer@kernel.org>
To: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/4] NFS/localio: various improvements
Date: Wed, 7 Jan 2026 11:08:54 -0500 [thread overview]
Message-ID: <20260107160858.6847-1-snitzer@kernel.org> (raw)
In-Reply-To: <cover.1767459435.git.trond.myklebust@hammerspace.com>
Hi,
This series has been rebased on Trond's recent patchset:
https://lore.kernel.org/linux-nfs/cover.1767459435.git.trond.myklebust@hammerspace.com/
but the first 2 patches were developed while chasing a particularly
nasty deadlock that was reproducible when putting LOCALIO under heavy
load on systems with smaller amounts of memory (16G). Ultimately that
deadlock happens to also be fixed by Trond's recent commit here:
https://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=cce0be6eb4971456b703aaeafd571650d314bcca
FYI, prior to that nfs_release_folio() deadlock fix, tasks would be
stuck like:
[92] "khugepaged"
[<0>] wait_on_commit+0x71/0xb0 [nfs]
[<0>] __nfs_commit_inode+0x131/0x180 [nfs]
[<0>] nfs_wb_folio+0xa7/0x1b0 [nfs]
[<0>] nfs_release_folio+0x6b/0x120 [nfs]
[<0>] split_huge_page_to_list_to_order+0x367/0x840
[<0>] migrate_pages_batch+0x208/0x7b0
[<0>] migrate_pages+0x220/0x550
[<0>] compact_zone+0x300/0x6e0
[<0>] compact_zone_order+0xc7/0x110
[<0>] try_to_compact_pages+0xe6/0x2d0
[<0>] __alloc_pages_direct_compact+0x8a/0x210
[<0>] __alloc_pages_slowpath.constprop.0+0x218/0x9c0
[<0>] __alloc_pages_noprof+0x335/0x350
[<0>] __folio_alloc_noprof+0x14/0x30
[<0>] alloc_charge_folio+0xdd/0x1b0
[<0>] collapse_huge_page+0x63/0x700
[<0>] hpage_collapse_scan_pmd+0x627/0x750
[<0>] khugepaged_scan_mm_slot.constprop.0+0x3cf/0x5a0
[<0>] khugepaged+0x105/0x200
[<0>] kthread+0xef/0x230
[<0>] ret_from_fork+0x31/0x50
[<0>] ret_from_fork_asm+0x1a/0x30
and:
[12813] "nfsd"
[<0>] wait_on_commit+0x71/0xb0 [nfs]
[<0>] __nfs_commit_inode+0x131/0x180 [nfs]
[<0>] nfs_wb_folio+0xa7/0x1b0 [nfs]
[<0>] nfs_release_folio+0x6b/0x120 [nfs]
[<0>] split_huge_page_to_list_to_order+0x367/0x840
[<0>] migrate_pages_batch+0x208/0x7b0
[<0>] migrate_pages+0x220/0x550
[<0>] compact_zone+0x300/0x6e0
[<0>] compact_zone_order+0xc7/0x110
[<0>] try_to_compact_pages+0xe6/0x2d0
[<0>] __alloc_pages_direct_compact+0x8a/0x210
[<0>] __alloc_pages_slowpath.constprop.0+0x218/0x9c0
[<0>] __alloc_pages_noprof+0x335/0x350
[<0>] alloc_pages_mpol_noprof+0x8f/0x1f0
[<0>] folio_alloc_noprof+0x5b/0xb0
[<0>] __filemap_get_folio+0x177/0x330
[<0>] nfs_write_begin+0x81/0x370 [nfs]
[<0>] generic_perform_write+0x91/0x290
[<0>] nfs_file_write+0x1ea/0x2f0 [nfs]
[<0>] vfs_iocb_iter_write+0xc0/0x210
[<0>] nfsd_vfs_write+0x26e/0x760 [nfsd]
[<0>] nfsd_write+0x17c/0x1c0 [nfsd]
[<0>] nfsd3_proc_write+0x10b/0x1a0 [nfsd]
[<0>] nfsd_dispatch+0xea/0x220 [nfsd]
[<0>] svc_process_common+0x4cd/0x6c0 [sunrpc]
[<0>] svc_process+0x145/0x210 [sunrpc]
[<0>] svc_handle_xprt+0x481/0x550 [sunrpc]
[<0>] svc_recv+0x170/0x2c0 [sunrpc]
[<0>] nfsd+0x8f/0xf0 [nfsd]
[<0>] kthread+0xef/0x230
[<0>] ret_from_fork+0x31/0x50
[<0>] ret_from_fork_asm+0x1a/0x30
Anyway, I think this LOCALIO series is worthwhile on its own and ready
for wider review and hopeful inclusion.
Thanks,
Mike
Mike Snitzer (4):
NFS/localio: prevent direct reclaim recursion into NFS via nfs_writepages
NFS/localio: use GFP_NOIO and non-memreclaim workqueue in nfs_local_commit
NFS/localio: remove -EAGAIN handling in nfs_local_doio()
NFS/localio: switch nfs_local_do_read and nfs_local_do_write to return void
fs/nfs/localio.c | 60 +++++++++++++++++++++++++++++-------------------
1 file changed, 36 insertions(+), 24 deletions(-)
--
2.44.0
next prev parent reply other threads:[~2026-01-07 16:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-03 17:14 [PATCH 0/4] Fix misc localio issues Trond Myklebust
2026-01-03 17:14 ` [PATCH 1/4] NFS/localio: Stop further I/O upon hitting an error Trond Myklebust
2026-01-05 17:19 ` Mike Snitzer
2026-01-05 17:35 ` Trond Myklebust
2026-01-03 17:14 ` [PATCH 2/4] NFS/localio: Deal with page bases that are > PAGE_SIZE Trond Myklebust
2026-01-05 17:40 ` Mike Snitzer
2026-01-03 17:14 ` [PATCH 3/4] NFS/localio: Handle short writes by retrying Trond Myklebust
2026-01-05 18:04 ` Mike Snitzer
2026-01-05 18:09 ` Trond Myklebust
2026-01-05 18:30 ` Mike Snitzer
2026-01-03 17:15 ` [PATCH 4/4] NFS/localio: Cleanup the nfs_local_pgio_done() parameters Trond Myklebust
2026-01-05 17:24 ` Mike Snitzer
2026-01-07 16:08 ` Mike Snitzer [this message]
2026-01-07 16:08 ` [PATCH 1/4] NFS/localio: prevent direct reclaim recursion into NFS via nfs_writepages Mike Snitzer
2026-01-07 16:08 ` [PATCH 2/4] NFS/localio: use GFP_NOIO and non-memreclaim workqueue in nfs_local_commit Mike Snitzer
2026-01-07 16:08 ` [PATCH 3/4] NFS/localio: remove -EAGAIN handling in nfs_local_doio() Mike Snitzer
2026-01-07 16:08 ` [PATCH 4/4] NFS/localio: switch nfs_local_do_read and nfs_local_do_write to return void Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260107160858.6847-1-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=anna.schumaker@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox