linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@primarydata.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH v2 6/6] NFS: Throttle I/O to the NFS server
Date: Wed, 16 Aug 2017 12:19:29 -0400	[thread overview]
Message-ID: <20170816161929.11271-7-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <20170816161929.11271-6-trond.myklebust@primarydata.com>

Ensure that we do not build up large queues of asynchronous I/O work in the
RPC layer that are not being handled by the socket.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/pagelist.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 548ebc7256ff..c9a664730e94 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -625,7 +625,8 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
 		ret = rpc_wait_for_completion_task(task);
 		if (ret == 0)
 			ret = task->tk_status;
-	}
+	} else
+		rpc_wait_for_msg_send(task);
 	rpc_put_task(task);
 out:
 	return ret;
-- 
2.13.5


  reply	other threads:[~2017-08-16 16:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 16:19 [PATCH v2 0/6] RPC client latency fixes Trond Myklebust
2017-08-16 16:19 ` [PATCH v2 1/6] SUNRPC: Don't hold the transport lock across socket copy operations Trond Myklebust
2017-08-16 16:19   ` [PATCH v2 2/6] SUNRPC: Don't hold the transport lock when receiving backchannel data Trond Myklebust
2017-08-16 16:19     ` [PATCH v2 3/6] SUNRPC: Don't loop forever in xs_tcp_data_receive() Trond Myklebust
2017-08-16 16:19       ` [PATCH v2 4/6] SUNRPC: Cleanup xs_tcp_read_common() Trond Myklebust
2017-08-16 16:19         ` [PATCH v2 5/6] SUNRPC: Add a function to allow waiting for RPC transmission Trond Myklebust
2017-08-16 16:19           ` Trond Myklebust [this message]
2017-08-16 16:43           ` Chuck Lever
2017-08-16 20:02             ` Trond Myklebust
2017-08-16 20:03               ` Chuck Lever
2017-08-16 18:54   ` [PATCH v2 1/6] SUNRPC: Don't hold the transport lock across socket copy operations Anna Schumaker

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=20170816161929.11271-7-trond.myklebust@primarydata.com \
    --to=trond.myklebust@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).