Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34294736rwd; Sun, 9 Jul 2023 08:55:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFJSOz+2GDUIHKsFFYe3w1a1PtbAZ882f2hrrn0+4CIBwrfwk6XwHzU5HILkiKG+TEg1XF2 X-Received: by 2002:a17:906:7398:b0:993:da87:1c7b with SMTP id f24-20020a170906739800b00993da871c7bmr5252309ejl.10.1688918110293; Sun, 09 Jul 2023 08:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688918110; cv=none; d=google.com; s=arc-20160816; b=TdEuMub2Xk3tK1NDrj/ogwBMHS+alo2jgV13YF4FJ1T7iOkt6C4xODnF/VknnsdKer 3/XNKh3Z4P8shmHqZHCilnajZ98GHCWgDboNr+h32ANtysKDFaJbK8UVmAr5+nwzjKt8 Z/zhRn+OJxqlvSLWRpYzjCvshobKkQSxXheKRr5rNtfKowL8TilP/m9lQ5XC+jaoQyra AEuqHdhZTf7ectoWxMuM7qLHrVBuDsuyB/P7Nmb9zT2CuqjpIsl1cLVHUOOb+gmtveXu OLwa8uk1k+vqRlCHql2a+xBm04/WCOKQ6gHJhzCCf2NgB6SGsW5AsnZIhJBThMzYq9VV Er7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=IMahNKUHoG3Mpi2yHuu1O81rmlfaJ6TAYMlILjXAM7g=; fh=JQd50hxhsnDf0UEbJWlcTOJpDnhhNX6CqFfxPRL5eAI=; b=SM3+mdlkTj4OOUR0dp7ZVmH+gOFCQSAOdlhMBTo0aVulyyrmX9vbqfnh7lBpE1oSKU YPfPsGYb0K2W3vERS11EVkmhfi0bFEqZNWpkq2ruuA3UcLXgVxXhpbSQCIrIbWvoiSUz 2Na4dDB4IvqQQ/dOpyrtKSZFDsHIVFWysfDlrEgM20+lN8LYmCc7BMCOKcWeSvKTToVd iJIb/i+TA28Jn1cBKSb4cYoy0RwWdfxT94+I3PQExjgulHWCYHq5aMpeeuf/KtnH9r5c MVGpvTD82YSSjh5T5SyKp3jTSl15PaWGBAK56mAxZgBYHLmWvK7mnq0WiEZ1OjgolKD9 KREg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s9K21s1G; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lu26-20020a170906fada00b00988939ad0bdsi6880436ejb.321.2023.07.09.08.54.42; Sun, 09 Jul 2023 08:55:10 -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=@kernel.org header.s=k20201202 header.b=s9K21s1G; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232079AbjGIPpN (ORCPT + 99 others); Sun, 9 Jul 2023 11:45:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbjGIPpN (ORCPT ); Sun, 9 Jul 2023 11:45:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 757DF91 for ; Sun, 9 Jul 2023 08:45:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B0D260BE9 for ; Sun, 9 Jul 2023 15:45:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F7C6C433C7; Sun, 9 Jul 2023 15:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688917511; bh=Hcgci1GBS7zMu9dFkEhzXLCsbAjNeJyI+sJrRbX6TXQ=; h=Subject:From:To:Cc:Date:From; b=s9K21s1GbioT5x4GTVyxfgwD8QolF+giGYpgk7ken4Zxyx5uyWNtBHtjdqWW4upkC P3yOFwYEiXlXKbxez3cR41KvsHCzB7n9nAcJ+1goqhRwiZ7d1PFChENQQshv8/r2iI 7EP6EKR/9K/FXCD/yA4ck6qO+4iC5wX+Sk8Hof2TMX71uXkX4ncjiEM2VNEMVzXpSk GSke+AgsuNsBilHKZbVrpF1DqwipVthdI7e1U/Sdyt0eRvvlJ+vnzqd01xVCxtOkKt 53HV9K7QEtfHTPeM8XpYGAL9e4FRyLWCj+HlFC38iF8cmusZ8exB0OAlcrGpAJVXOT xwzGXIxFKeleQ== Subject: [PATCH v1 0/6] Fix some lock contention in the NFS server's DRC From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever Date: Sun, 09 Jul 2023 11:45:09 -0400 Message-ID: <168891733570.3964.15456501153247760888.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 This series optimizes DRC scalability by freeing cache objects only once the hash bucket lock is no longer held. There are a couple of related clean-ups to go along with this optimization. --- Chuck Lever (6): NFSD: Refactor nfsd_reply_cache_free_locked() NFSD: Rename nfsd_reply_cache_alloc() NFSD: Replace nfsd_prune_bucket() NFSD: Refactor the duplicate reply cache shrinker NFSD: Remove svc_rqst::rq_cacherep NFSD: Rename struct svc_cacherep fs/nfsd/cache.h | 8 +- fs/nfsd/nfscache.c | 203 ++++++++++++++++++++++++------------- fs/nfsd/nfssvc.c | 10 +- fs/nfsd/trace.h | 26 ++++- include/linux/sunrpc/svc.h | 1 - 5 files changed, 165 insertions(+), 83 deletions(-) -- Chuck Lever