Files
linux/include/linux
David Howells e00827a4d0 netfs: Fix read progress reporting
For really big read RPC ops that span multiple folios, netfslib allows the
filesystem to give progress notifications to wake up the collector thread
to do a collection of folios that have now been fetched, even if the RPC is
still ongoing, thereby allowing the application to make progress.

This works by taking the current rreq->cleaned_to value (which indicates
which folios have been unlocked) and adding the stashed size of the next
folio to it.  cleaned_to, however, is subject to 64-bit tearing on a 32-bit
arch.

Fix this by stashing the next progress notification point as a size_t
(which won't tear) to be added to rreq->start (which won't change), with
the collector thread calculating that from cleaned_to plus the next folio
size.

Further, however, if the folios are small, the collector thread gets
constantly woken up - which has a negative performance impact on the
system.

Fix that too by setting a minimum trigger of 256KiB or the size of the
folio at the front of the queue, whichever is larger.  Note that this has
an issue that different subreqs have different need-to-be-cached
properties; this is solved by a preceding patch that marks the property on
the folios whilst issuing subreqs rather than when collecting them.

Also, make sure rreq->cleaned_to is initialised up front, along with
rreq->collected_to and stream->collected_to.

Fixes: e2d46f2ec3 ("netfs: Change the read result collector to only use one work item")
Link: https://sashiko.dev/#/patchset/20260804100224.2748935-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260827134304.2075713-10-dhowells@redhat.com
Acked-by: Paulo Alcantara <pc@manguebit.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-08-31 09:54:38 +02:00
..
2026-07-23 10:24:12 -07:00
2026-08-07 14:18:13 -03:00
2026-08-10 18:00:47 +01:00
2026-07-29 17:54:58 -07:00
2026-08-04 19:18:48 -07:00
2026-08-15 17:09:32 -06:00
2026-08-15 23:36:18 +02:00
2026-07-27 16:25:34 +02:00
2026-08-06 06:47:33 -06:00
2026-07-07 15:10:48 -04:00
2026-07-31 10:09:12 +02:00
2026-07-23 15:42:48 +02:00
2026-08-31 09:54:38 +02:00
2026-06-26 22:18:34 -04:00
2026-07-28 21:11:47 -07:00
2026-07-23 19:21:13 +01:00
2026-08-15 23:36:18 +02:00
2026-07-27 17:18:00 +02:00