Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3601054ybl; Mon, 27 Jan 2020 07:01:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyV7bysZIFT4XUT6E0/jOwIQRbJUDldYYfdD10gTeYy+vGWoWk6UPDdj5drpYllSneg5zsI X-Received: by 2002:a05:6830:231d:: with SMTP id u29mr13292325ote.185.1580137294167; Mon, 27 Jan 2020 07:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580137294; cv=none; d=google.com; s=arc-20160816; b=FcaB+l3FgjZbGVoP365GIVw9aLchXz7NpqULhtQ1l+EbQg6ETF8odgQQWyXbLz0+i2 axbazPbgJoaWKiUMgHrg/yWcYODTpu/7awUk5X9m5+aq/9Diar++4Iod2CbWtzKKuy+C FaDxUcIjYmOU4BOvKiOR21GTK8e/6iITqnd4GaKh0TXYP2o6MjzwNnzFUIfFWlf3bs5R A0fiXTH8dVogpQk7V9yYGcVLz6LkuBf3iWNrAE3evWTM20sirbZnrrRRotxvcqHxlXPc 4WLgL0A+dN2S83SKFwr2Gr8xZNxg5vFB3a58j6jTs0qf1aBkoi1iV2/ddH5x8E1fFKOF lBuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=l46+hA+YJF48dQjV9Oj6chBzCq5FvgQEXpVraEaa2oU=; b=MLP55oN0SADHjj1e1nd5Eekv45Yi0hwv0uNQiarEQIVajWdhWdZXJAOU1lcEqHbwsQ mK0YIfiiPfLaLDvC3RWf772evmI+fcbPaS2FMLVmhgsE1uSJw/K/vKh7ThGA554lLhRh f3m6aFRA3w6Y4u4sYGMHAC1mhNyuQq2LCsFhvbTJT4AovCjmamfdX9jDQtTykixumrCB zlSiOkPEAbzMxZTHYkhZFUMdvFP9pfQkvsrVwq5vQ8KZ/l3OLb6wQq5NsZj4Af+oyX5t adznda0xrDW3uMvI5haA8WHQH7Rb/L9MD/ANCEPLkT7LHBP6g1/IvI8Dnrqi7xk4OBwp gQFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bf9b8YNT; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si7377890otc.105.2020.01.27.07.01.21; Mon, 27 Jan 2020 07:01:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bf9b8YNT; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729269AbgA0PAb (ORCPT + 99 others); Mon, 27 Jan 2020 10:00:31 -0500 Received: from mail-yb1-f179.google.com ([209.85.219.179]:42564 "EHLO mail-yb1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726443AbgA0PAa (ORCPT ); Mon, 27 Jan 2020 10:00:30 -0500 Received: by mail-yb1-f179.google.com with SMTP id z125so2920249ybf.9 for ; Mon, 27 Jan 2020 07:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l46+hA+YJF48dQjV9Oj6chBzCq5FvgQEXpVraEaa2oU=; b=bf9b8YNTC5iryyB6cx8FRi2RxqfgbKJENQEdt4IBDuFcfrU9+ZVDH8GV1Drqn+sgRp D9YJ/u0caJSZZ+hDDJJBJUri4LxTl1HMQW0LtlK0+jgkp9mZMwrVtMWjCDCHdhwxZfqd ayeHUIZs55CtNm7z2FVqxRtHlThPyqJP9psp1wS51mL77IqJ8Dq+u/P8u/ia82VIiDsY Hv/ZP5b1rC+GZZ2I515fFA2atIIIzQE0d+httFy95dP1eah2MEsIXqwxnGJBQTLwJzM8 ir8HwQ13yTwE3O3JyrbNYP656oXXc5T5SqpswHPtyPAfzyYn9y/Fb2fYmUfyzfCdGM2Y W71g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l46+hA+YJF48dQjV9Oj6chBzCq5FvgQEXpVraEaa2oU=; b=ix1bHC2Rv7XH7OiZ4GKNFV9grojEat3Ap2ICTG7vhSuzngDhk0YaRJE7TyZCEnRN5V aj/fpGOQaVzDbZ8VGtZKawPcHYBGstwyPRY5z7pDIJWKGI86rOFUAC7mM9IimMALeOQ9 a1zvmOHDDF16fPzTb52wGZCBT2dY0mXyyR+vpE8I8rDVNvdXW9n3fyq9EuEdzTvwXlUV 7+cDc9wya9MyWHAQqrpgZd222VOC0BuCiU2z6VxArVLFk8W3HGbqNXRzH06g4MbPDgBW i5QhcAgxwizHn5FZ4Y75ohsormxYRhrWne7OQO0/cpq5lM2MOF4iEEFlPZUrjyzMF2dG Tyww== X-Gm-Message-State: APjAAAWsTY0IZ9+b0HNxfjYCUjHtXgT2ROF19r4oaPDmK6KnkJaXMb2i BNjC1+LMV5q0T5TQbXb0oA== X-Received: by 2002:a25:c589:: with SMTP id v131mr13531020ybe.490.1580137228912; Mon, 27 Jan 2020 07:00:28 -0800 (PST) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id d186sm6809096ywe.0.2020.01.27.07.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 07:00:28 -0800 (PST) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH 0/5] Fix up delegation management Date: Mon, 27 Jan 2020 09:58:14 -0500 Message-Id: <20200127145819.350982-1-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Delegations allow the client to cache various objects aggressively, however they can also be a source of scalability issues on the server if not returned when not it use. The following patchset allows the client to set a limit on the number of delegations that it holds. Once it hits that limit, it starts to return the delegations on close in order to avoid swamping the server with state. Trond Myklebust (5): NFSv4: nfs_inode_evict_delegation() should set NFS_DELEGATION_RETURNING NFS: Clear NFS_DELEGATION_RETURN_IF_CLOSED when the delegation is returned NFSv4: Try to return the delegation immediately when marked for return on close NFSv4: Add accounting for the number of active delegations held NFSv4: Limit the total number of cached delegations fs/nfs/delegation.c | 80 +++++++++++++++++++++++++++++++++++++-------- fs/nfs/delegation.h | 1 + fs/nfs/nfs4state.c | 1 + 3 files changed, 69 insertions(+), 13 deletions(-) -- 2.24.1