From patchwork Wed Aug 16 16:19:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9904135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1630960231 for ; Wed, 16 Aug 2017 16:19:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08E6C28A02 for ; Wed, 16 Aug 2017 16:19:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F224928A10; Wed, 16 Aug 2017 16:19:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B271928A02 for ; Wed, 16 Aug 2017 16:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751531AbdHPQTp (ORCPT ); Wed, 16 Aug 2017 12:19:45 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35299 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbdHPQTo (ORCPT ); Wed, 16 Aug 2017 12:19:44 -0400 Received: by mail-it0-f66.google.com with SMTP id 76so2666917ith.2 for ; Wed, 16 Aug 2017 09:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=50Eo+AVL+5cChDKqH20mGlyYsQSO41m7Z3KbuKZDVm4=; b=sdrAetbHy+19EVmjRaFh5wkL76IgqQwwW7RsOXxD6PaxkKBjp1BphTfQfkrojmSKLt d8/JQuiLr4PI2539w/mc772x9ixz4T5heMT81w5VYI2TTh8fq082a09bonewD1c8s0lU 6agqaVMIkK/qbJ9oMySBEuKqKHw+c2ZaHTtKlhxUW7dpRKMgv7pW+aU8eI6K7+g2riaC yW73UzEwTVxjOuq/5WmUWhP6mySH076GMkT7RjaMndU+/jTcM93BKMkeBo3XUDQCltAz O59qrXb1PkceYKI/A9qIdoQ/Wyh3uMbC6yOnn8kwWLcX6OXvZpn3gXu3d0Sx02Y3hqlO 3OWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=50Eo+AVL+5cChDKqH20mGlyYsQSO41m7Z3KbuKZDVm4=; b=rzuz1U9jl0DymEiWeTQVoLkRwEhkSEe34OQ2uoJkpd5mmSkXbt4Y/u4GMOyq03o5z8 dcbDLL6eM0jhDbA6mqRPDPvcDpI551TkgWt2mx/w7UhbzzzkK928V2yBaQrPF3rSLuAc BbDMBKV1BeJ6/r5gzrk704O1rC9VkZqwHUoctydxOYtrZBtgZKp5TSibWgaUi3sQIcor Q8QVrYmijPiBgutNrw9iTCnJw/gU+hTAgVV+fKeaazn8zrgRaIfxwcn0cAMEtL5iVRU6 U+Wmz6F3QIpKjQNYtE5ytW2QG9INB72/ePXRQFhaYNM1yEcy/D2yHiFouNznx7/hTyiD x+dQ== X-Gm-Message-State: AHYfb5hH03xAvSJebDXyRjzTpF1Yc69AeBQYXgksqkHLQuUmDhXgoWuP Ys5Ec9YnAbrZEFd435U= X-Received: by 10.36.112.199 with SMTP id f190mr2314307itc.161.1502900383266; Wed, 16 Aug 2017 09:19:43 -0700 (PDT) Received: from localhost.localdomain (c-68-49-162-121.hsd1.mi.comcast.net. [68.49.162.121]) by smtp.gmail.com with ESMTPSA id b79sm646110itb.5.2017.08.16.09.19.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Aug 2017 09:19:41 -0700 (PDT) From: Trond Myklebust 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 Message-Id: <20170816161929.11271-7-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170816161929.11271-6-trond.myklebust@primarydata.com> References: <20170816161929.11271-1-trond.myklebust@primarydata.com> <20170816161929.11271-2-trond.myklebust@primarydata.com> <20170816161929.11271-3-trond.myklebust@primarydata.com> <20170816161929.11271-4-trond.myklebust@primarydata.com> <20170816161929.11271-5-trond.myklebust@primarydata.com> <20170816161929.11271-6-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;