Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5617imw; Tue, 12 Jul 2022 13:25:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQO5eXtuL8IE45NLy10lHbriSAGBhcngD5e5VzzCP6BPpC6KQbvQcFvtuRTCom/lHzzA5g X-Received: by 2002:a63:cc53:0:b0:40d:bf0e:21a4 with SMTP id q19-20020a63cc53000000b0040dbf0e21a4mr36390pgi.162.1657657519813; Tue, 12 Jul 2022 13:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657657519; cv=none; d=google.com; s=arc-20160816; b=YBUAg1+Y4k9NP3Z/YNBxGgaVPlU3Lyzk7t6JGQGVIMCWbEMnpO7KK2i+wK1nRNLqLh SFecOeHBl9fwi3rTtKGsYd7igcUMwIgzp7GHqxnXK4oq6bsV739sQLO2OzXr04iQuorM YzJFTms4uZpxLw9sMUk9uSvzYPHmTHUMJJr5K57uXB0MKGNCM//2ke1ggROI4rTf+hl3 eaKrLu9TD3G63llZsmNZUS3++7VCf3S9ix4VF8rJ3O7SyXzKcMlzhWo2nhwQyvDv2Q9Z hyS4NG2hfKBvWqO3qm6bHaojVtxXabgCIWjw8uv3xsjp5Xumo6sk4Ntg1GB6orm2X5Dx qt5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=PdMt26dtj7QSVmDLxENHTyQvqeUxsTf66prO/TqWW8E=; b=1Lg1MVSn7cSjQyFLz+vDrgzj/6aOFdF6grNfJEaEraN9/cdxN51Bjo9FCBGmWVOmM8 IK+m3CAkFUuBWaC2WGRcDMx4oVjeCrAIk8P+Qerpdm1W/XJ4Yu1wkuwc15UW/u0cdWrf nYsy6I5zxYSW8VjRtly2g0jGndMZVQB9WiXbOH01EIIbU1ap1PRVNfufRxCDA0zzJZH7 d47g8blxitzpImA+7A5zOdzESUBJ5hq6CzYvNMcvGVOz/zwoWnEjg3KxtUgFNFZ24BPD 9SqmmXF4TL0RCg3IFw6vv0E8TlZTdjlG/0SDC3bYz20TYXzIqAnQwgnjKfKYhZ3zQZpM rpgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=o3vsBLQE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a636b06000000b00415dfbed12bsi12091675pgc.514.2022.07.12.13.24.39; Tue, 12 Jul 2022 13:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=o3vsBLQE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233412AbiGLUJY (ORCPT + 99 others); Tue, 12 Jul 2022 16:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbiGLUJX (ORCPT ); Tue, 12 Jul 2022 16:09:23 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E486BA39D for ; Tue, 12 Jul 2022 13:09:23 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26CJY2PO023202 for ; Tue, 12 Jul 2022 20:09:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2021-07-09; bh=PdMt26dtj7QSVmDLxENHTyQvqeUxsTf66prO/TqWW8E=; b=o3vsBLQEVGfuLik5YakjR4H0k7RE3kXoEH3gPcm9UhekThqyf15l+5dOUCSurlE4Bogo 6tW3S9NJr+iXeBCfQQyEUv0Mel/ldozFHCJb7mTAERheO9I5o8xA5oWrmM1+z860uMt2 xu+0aBH0Rp4Q/aZLTWYSt7THqVGwGI7eQg4N1od1va38jPo3K8PnC0z/NIh0I8ukriOH DSxPQUMawRx4cVDIVD+qMjFHmGLsK8TaoZ1PaOEYoFDc/x4rC2oXV9CdElKX7cnp5ZSB ssmoH4kdaKoicEyMKU6XMgLHU/sUtp3lFnL6FD6eNk5F+g9Yp/NNSLGC9U3DlyBW3r/Q XA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3h71r17ye6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 12 Jul 2022 20:09:22 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 26CK1Mj1020073 for ; Tue, 12 Jul 2022 20:09:15 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3h70449spb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 12 Jul 2022 20:09:15 +0000 Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 26CK9EDb003044 for ; Tue, 12 Jul 2022 20:09:14 GMT Received: from ca-common-hq.us.oracle.com (ca-common-hq.us.oracle.com [10.211.9.209]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3h70449snp-1; Tue, 12 Jul 2022 20:09:14 +0000 From: Dai Ngo To: chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org Subject: Date: Tue, 12 Jul 2022 13:09:11 -0700 Message-Id: <1657656553-16493-1-git-send-email-dai.ngo@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-ORIG-GUID: x0k5z7I1c1ZDf61G6Moc915NKWIOxjRK X-Proofpoint-GUID: x0k5z7I1c1ZDf61G6Moc915NKWIOxjRK X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org s patch series enforces a limit on the number of v4 clients allowed in the system. With Courteous server support there are potentially a lots courtesy clients exist in the system that use up memory resource preventing them to be used by other components in the system. Also without a limit on the number of clients, the number of clients can grow to a very large number even for system with small memory configuration eventually render the system into an unusable state. --- Dai Ngo (2): NFSD: keep track of the number of v4 clients in the system NFSD: limit the number of v4 clients to 4096 per 4GB of system memory fs/nfsd/netns.h | 3 +++ fs/nfsd/nfs4state.c | 25 +++++++++++++++++++------ fs/nfsd/nfsctl.c | 10 ++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) -- Dai Ngo