mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] fs: nfs: Start earlier to resend requests
@ 2021-06-11  7:13 Uwe Kleine-König
  2021-06-11  8:52 ` Gavin Schenk
  2021-06-11 11:13 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2021-06-11  7:13 UTC (permalink / raw)
  To: barebox

On a customer site we're experience a bit over 1% UDP packet loss. When
wiresharking an NFS transfer of a kernel image (with the goal to boot
via NFS) I saw 64 of 2555 RPC calls staying unanswered. With the current
timeout setting each of them introduces a delay of 2 seconds and the
whole transfer takes 137s. With the timeout reduced to 0.1s the transfer
time is not optimal (going down to approx 15 seconds) but at least it
becomes bearable.

To still cope with a slow network (in contrast to an unreliable as
pictured above) increase NFS_MAX_RESEND to keep NFS_TIMEOUT *
NFS_MAX_RESEND (which defines the overall timeout before aborting the
transfer) constant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 fs/nfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs.c b/fs/nfs.c
index 1130632eb3eb..057641edc8c3 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -119,8 +119,8 @@ struct rpc_reply {
 	uint32_t data[0];
 };
 
-#define NFS_TIMEOUT	(2 * SECOND)
-#define NFS_MAX_RESEND	5
+#define NFS_TIMEOUT	(100 * MSECOND)
+#define NFS_MAX_RESEND	100
 
 struct nfs_fh {
 	unsigned short size;
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] fs: nfs: Start earlier to resend requests
  2021-06-11  7:13 [PATCH v2] fs: nfs: Start earlier to resend requests Uwe Kleine-König
@ 2021-06-11  8:52 ` Gavin Schenk
  2021-06-11 11:13 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Gavin Schenk @ 2021-06-11  8:52 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Fri, Jun 11, 2021 at 09:13:51AM +0200, Uwe Kleine-König wrote:
> On a customer site we're experience a bit over 1% UDP packet loss. When
> wiresharking an NFS transfer of a kernel image (with the goal to boot
> via NFS) I saw 64 of 2555 RPC calls staying unanswered. With the current
> timeout setting each of them introduces a delay of 2 seconds and the
> whole transfer takes 137s. With the timeout reduced to 0.1s the transfer
> time is not optimal (going down to approx 15 seconds) but at least it
> becomes bearable.
> 
> To still cope with a slow network (in contrast to an unreliable as
> pictured above) increase NFS_MAX_RESEND to keep NFS_TIMEOUT *
> NFS_MAX_RESEND (which defines the overall timeout before aborting the
> transfer) constant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Gavin Schenk <g.schenk@eckelmann.de>

I have tested this on the customer site with 1% UDP loss :). I am working with
the IT department to get a better network. Until that happens, this patch helps
me successfully boot NFS.

Regards
Gavin Schenk

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] fs: nfs: Start earlier to resend requests
  2021-06-11  7:13 [PATCH v2] fs: nfs: Start earlier to resend requests Uwe Kleine-König
  2021-06-11  8:52 ` Gavin Schenk
@ 2021-06-11 11:13 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2021-06-11 11:13 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Fri, Jun 11, 2021 at 09:13:51AM +0200, Uwe Kleine-König wrote:
> On a customer site we're experience a bit over 1% UDP packet loss. When
> wiresharking an NFS transfer of a kernel image (with the goal to boot
> via NFS) I saw 64 of 2555 RPC calls staying unanswered. With the current
> timeout setting each of them introduces a delay of 2 seconds and the
> whole transfer takes 137s. With the timeout reduced to 0.1s the transfer
> time is not optimal (going down to approx 15 seconds) but at least it
> becomes bearable.
> 
> To still cope with a slow network (in contrast to an unreliable as
> pictured above) increase NFS_MAX_RESEND to keep NFS_TIMEOUT *
> NFS_MAX_RESEND (which defines the overall timeout before aborting the
> transfer) constant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  fs/nfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-11 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  7:13 [PATCH v2] fs: nfs: Start earlier to resend requests Uwe Kleine-König
2021-06-11  8:52 ` Gavin Schenk
2021-06-11 11:13 ` Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git